By decaobr
I currenty have a LAMP, running on Ubuntu 14.04, yesterday everything was fine, but today my MYSQL is not working.
When i try to connect via
mysql -u root -p
I get the error: ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)
the Mysql.err file is completely empty, and have absolute no ideia about what to do.
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!
This comment has been deleted
My problem was running out of memory. Digital ocean has great instruction for adding swap memory for Ubuntu: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
This solved the issue and enabled me to restart the Mysql that otherwise would not start.
If you are creating a droplet from snapshot, then make sure to update the bind-address field with the new ip address.
$sudo nano /etc/mysql/my.cnf
Update the bind-address field with new ip address then run
$sudo service mysql start
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.