mysql remote access
I am posting this in case someone else has the same problem.
I was having a problem getting remote access to work for mysql.
I had created the remote user and I had setup iptables to allow 3306 connections from the other server.
But it still didn't work.
telnet on the mysql server I wanted to connect to, showed the port was listening on localhost, but the port was not listening externally.
telnet 127.0.0.1 3306 (listening)
telnet 111.222.333.444 3306 (not listening)
It appears that for remote access, mysqld looks in it's my.cnf file for the bind-address, for example bind-address=myServer.co.uk. Then it gets the external IP from /etc/hosts. /etc/hosts was mapping myServer.co.uk to 127.0.0.1
Changing /etc/hosts to map myServer.co.uk to 111.222.333.444 solved the problem.
Last edited by unkie888; 02-11-2011 at 11:01 AM.
|