-   Linux - Server (
-   -   mysql not open for networking (

dannyor 11-04-2009 03:38 AM

mysql not open for networking

I have mysql running on an Ubuntu Server 9.10
Running "telnet localhost 3306" shows that mysql is alive and responding.

Running the same command from a different machine gives:
>telnet vprod 3306
telnet: Unable to connect to remote host: Connection refused

So, I stopped mysql and started a dummy server on port 3306 and guess what ... it WAS accessible!
definitely not a firewall problem.

logging into mysql "mysql -p -r ..." and then using "SHOW VARIABLES;" shows that skip_networking=OFF

I ran out of ideas ...
any help would be appreciated.

Thanks in advance

Guttorm 11-04-2009 03:54 AM


Edit the file /etc/mysql/my.cnf

Look for the line:
bind-address =

Either comment out the line, delete it, or change it to:
bind-address =

Then restart mysql.

Also, you need to check the mysql privileges. Typically, you use something like
grant all privileges on databasename.* to someuser@localhost identified by 'somepassword';

I think it's better to limit the access, change @localhost to @clientsaddress

avijitp 11-04-2009 08:01 AM

bind-address = in my.cnf is the key here.

All times are GMT -5. The time now is 11:52 AM.