Question
Mysql server stops very frequently
Recently I installed Zpanel on an Unbuntu 12.04.5 x64 droplet. All gose web, but i have a problem.
Mysql stops working and I have no idea why. Can someone help me with this problem?
I tried to check if mysql is up and make cronjob to restart it but that does not work.
I need to restart manually from command line. That is not a problem, but if i’m not at home, how can i restart the mysql?
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.
×
I am having somewhat same issue here: https://www.digitalocean.com/community/questions/getting-mysql-said-reading-initial-communication-packet-system-error-0-when-connecting-through-iphone-network?comment=24517.
Did the log file indicate warnings before it died. For mariadb on Ubuntu, do
For mysql on Ubuntu, do
Look for shutdown messages or errors.
Yeah it’s ridiculous. It happens to my site all the time. And I never know when it goes down. No one at digital ocean seems to have any idea why. Definitely considering switching because of it.
A power cycle seems to work to load everything back up, but that doesn’t work all the time.
I am running a couple of low memory instances and it is often an issue with running out of memory. These boxes are running wordpress, which can manage your memory poorly when run out of the box. I have to restart the service:
sudo service mysql restart
This is definitely not a fix for the issue, but addresses a symptom. You can add nagios to monitor the server and text you when the database crashes. @monaya
Hello, did anyone get a solution for this problem?
Hi there,
I’m facing the same for a while (Wordpress sites too) and always resolve it by a
sudo poweroff
, but it is really frustrating. To get alerted, I use statuscake.com. I definitely need a solution as well.Hi there,
I’m having the same issue as well. Even when I leave my WP with no traffic at all, the mysql goes down almost everyday or two. I tried to add a swap file to it too but it doesn’t help.
Hi there,
I had the problem again (despite increasing -again- droplet size).
I used
/etc/init.d/mysql start
and the output wasERROR : The partition with /var/lib/mysql is too full!
. Then I usedsudo /etc/init.d/mysql start
and it did the trick.Also you can use
sudo service mysql start
which is way simpler to remember.This is not a fix but at least, this way you don’t have to
poweroff
and restart.I will digg around
ERROR : The partition with /var/lib/mysql is too full!
. Anyone has any idea about it ?I found the solution,
seems that our droplets doesnt have enogh memory some times and mysql cant allocate what it needs and crash, so we need to create a swap space to help this.
this is what I did:
On the command line
vim is started to edit, add the following to the end of /etc/fstab file
Then, edit the mysql config file
And add this under [mysqld]
Finally reload mysql
The solution of Juanjo solves my problem
it doesn’t solve mine………
The solution of Juanjo solves my problem, too. Thanks!!!!
Jose Carlos Ramos Carmenates
thx juanjo2988
my sql problem solved!!
juanjo2988 soolved my sql problem too! thanks..
Hello, Thanks a loot for this solution juanjo2988 but hen I wanted to restart the Mysql Service I had this error and the service didn’t started since :
“Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service” and “journalctl -xe” for details.“
Hi there, 2017, same problem. juanjo2988 solution looks like a good one, but it doesn’t work with me. I’m not running a Wordpress, but a Drupal…
The solution from Juanjo seems to work, my site has been online now for more than a week!
Hello , why don’t i have this under my config file ?
“And add this under [mysqld]”
this is want mine looks like
Also note i added “!” in front of innodbbufferpool_size=64M or else I get a error before reboot?
well its working now, i’m not sure if i did the correct thing ?
Thanks Juanjo!
Thanks a lot @juanjo2988 your solution worked for me as well