Question

After updating bind-address in /etc/msql/my.cnf file MySQL stops working

Operating System & Droplet information Ubuntu 14.04.3 x64 1GB Ram 30GB SSD Disk

Steps to reproduce the error $ sudo apt-get update $ sudo apt-get install mysql-server $ sudo mysql_install_db $ sudo mysql_secure_installation

After updating all packages and downloading/configuring required packages, I tried the following:

$ sudo nano /etc/mysql/my.cnf Find the bind-address under [mysqld].

I changed the *bind-address to my second Droplet’s Private Network Address. After that, I told MySQL to restart with the following command: sudo service mysql restart and I got the following reply:

mysql stop/waiting
start: Job failed to start

It does work fine when I edit the file back to it’s original settings (listening to 127.0.0.1 instead of a Public or Private Network Address).

I’ve also tried to clear log files, purge the system and re-install everything again (on three or four different Droplets). So far without any luck.

What am I doing wrong? Is this a known issue, maybe?

Articles that I’ve (tried) to follow:

https://www.digitalocean.com/community/tutorials/how-to-set-up-and-use-digitalocean-private-networking

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-remote-database-to-optimize-site-performance-with-mysql

Various StackOverflow articles that had similar issues, but their solutions haven’t worked for me (purging the system, re-installing, etc.).

Thank you in advance.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

The order is important, so try this procedure:

  1. while the bind-address is set at 127.0.0.1, invoke ‘service mysql stop’ and then examine the output of ‘service mysql status’ to make sure it has stopped
  2. edit the ‘my.cnf’ and set the bind address to your private network address, and make sure there is no ‘skip-networking’ in the my.cnf file
  3. invoke ‘service mysql start’ and soon after ‘service mysql status’