seems like i can’t connect to mysql, so mywebsite displays error. memory and cpu usage is good, ubuntu security is ok, joomla security is high level…this is the second time…i only need some assistance to get my database.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

If you think this is a MySQL problem, I would check is it up and running.

If you’re running Ubuntu 16.04 or newer, the following command is going to do the job:

  • sudo systemctl status mysql

Observe for status, which should report running.

If it isn’t running, you can try starting it:

  • sudo systemctl start mysql

Check the status again.

You can also check system logs, to try to find the root of the problem. System logs are located in the /var/log/syslog file, so open it in a text editor:

  • sudo nano /var/log/syslog

Observe for MySQL log. Also, if MySQL wasn’t running, you can check is there some OOM, OOM killer or Out of memory logs. If yes, you’re running out of memory for some reason, which causes MySQL to go down. This is quite a common reason why users have MySQL problems, so check it out.

If this doesn’t fix your problems, share the error your website is returning, maybe it can be helpful to debug the problem. my /var/log/syslog no OOM, OOM killer or Out of memory logs. i tried start/stop/start my mysql just now, but it failed to restart (it was running at first tho, then i stop then restart again, then it failed to start)

Submit an Answer