Question

mysql won't start after bind-address change

Hello.

I have problems with my database connectivity. I can connect using localhost, but when I try to connect using my droplet’s IP I just can’t.

I’ve granted all privilages to the user and flushed them all. Still nothing.

Then I run command “netstat -plant|grep “:3306”|grep “LISTEN”” and noticed that it listens on 127.0.0.1. I tried to edit my /etc/mysql/my.cnf file, but it was empty (by empty I mean lot of commented text and two lines which are !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/) So I decided to add at the end of the file “bind-address=0.0.0.0” since it was nowhere there. But my mysql won’t start with this line at this file. I’ve waited couple of minutes and It couldn’t start. When I deleted this line it started immediately.

What can I do now to make connections from public IPs possible?


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.

OK. I am just a moron. The file I need to edit is actually /etc/mysql/mysql.conf.d/mysqld.cnf I could notice that by included directories Case Solved :)

This comment has been deleted