MySQL server vanished

  • Posted December 1, 2013

Hi, MySQL server is vanished and I don’t know why. Restoring previous (and stable) backups won’t help at all. Running htop command, there are no instances of mysql is shown and service mysql restart gives the following error:

stop: Unknown instance: start: Job failed to start

I checked if it’s installed by apt-get install mysql-server: “mysql-server is already the newest version.” I don’t want to remove and re-install it because I don’t want to lose existing tables.

Command “mysql” gives this error: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)

Any ideas what might the problem be?


Let 's it command: service mysqld start

Just do it :D

Signature Phan Trong Giap

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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 already have mariadb. The server is up and running, it’s not a memory problem. But suddenly all my databases have disappeared. Any ideas what may be happening? Has DO changed something and the data has gone? All my Wordpress powered databases need some data!

Another note: I tried to run fsck to see if there is an issue with the file system and got this error: <br> <br>root@vithefiddler:~# fsck -v <br>fsck from util-linux 2.20.1 <br>fsck.ext4: Unable to resolve ‘UUID=b96601ba-7d51-4c5f-bfe2-63815708aabd’ <br> <br>This is what my fstab looks like (I haven’t changed it since the image instantiation.) <br> <br># /etc/fstab: static file system information. <br># <br># Use ‘blkid’ to print the universally unique identifier for a <br># device; this may be used with UUID= as a more robust way to name devices <br># that works even if disks are added and removed. See fstab(5). <br># <br># <file system> <mount point> <type> <options> <dump> <pass> <br>proc /proc proc nodev,noexec,nosuid 0 0 <br># / was on /dev/vda1 during installation <br>UUID=b96601ba-7d51-4c5f-bfe2-63815708aabd / ext4 noatime,errors=remount-ro 0 1

I’m having the same issue with mysql on my server it’s the ubuntu 12.04 x64 image. mySQL is apparently crashing overnight, and a restart brings it back. when I run service mysql restart, I get stop: unknown instance: <br> <br>It then restarts successfully. I don’t have any errors in /var/log/mysql.log or /var/log/mysql.err <br> <br>Any help would be greatly appreciated. <br> <br>Thanks, <br>Vi

It disappearing means that MySQL/MariaDB is not running. Check MySQL’s error logs and see if you can find any pointers on why it’s crashing.

After a deep research, I found out that mysql.sock file has dissapeared somehow. I couldn’t bring it back no matter what I have tried. <br>Temporary solution: Install mariadb on top of mysql. It fixes the problem.