How to fix it qulickly? ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) | Mysql can’t be started (start job failed to start error) | MySQL -Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
df -h Filesystem Size Used Avail Use% Mounted on udev 493M 12K 493M 1% /dev tmpfs 100M 380K 100M 1% /run /dev/vda1 25G 12G 13G 49% / none 4.0K 0 4.0K 0% /sys/fs/cgroup none 5.0M 0 5.0M 0% /run/lock tmpfs 497M 0 497M 0% /run/shm none 100M 0 100M 0% /run/user /dev/vda15 105M 3.2M 102M 4% /boot/efi /dev/loop0 497M 8.0K 497M 1% /tmp
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
Have you tried restarting MySQL?
systemctl restart mysql
If you experience the problem even after the restart, I would recommend following the steps listed in this reply here:
https://stackoverflow.com/a/11990813
Hope that this helps! Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.