By kaszczynski
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?
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
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 :)
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.