Standalone MySQL server, unable to connect

Hi,

I've followed this guide:

http://library.linode.com/databases/mys … -etc-hosts">http://library.linode.com/databases/mysql/standalone-mysql-server#sph_edit-etc-hosts

I've got two Linodes (in the same data center) and followed each step in the guide. However, I'm unable to connect to the MySQL-Linode from my App-Linode. I'm able to ping from "foo.app1" to "foo.mysql1" and vice versa, but when I'm trying to connect to MySQL I'm getting: ERROR 2003 (HY000): Can't connect to MySQL server on 'foo.mysql1' (110)

MySQL is working on the MySQL-Linode though when I'm connecting using mysql -h localhost -u root -p.

I have no idea what's going on, nothing in the logs so I'm a bit stuck here. Thanks!

4 Replies

You're sure you did the bind-address part, and restarted mysql after doing it? You're sure you don't have any sort of firewall rules that might be blocking the connection?

Yes! It's exactly as the guide tells me: (/etc/mysql/my.cnf) bind-address = foo.mysql1

And restarted…

You should use your internal ip address for bind address not foo.mysql1

Thanks! It worked well! Also, the connection was locked by CSF.. :) Wasn't thinking about that, so after I added the exception in the firewall and changed to the servers' ip it works fine.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct