LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   mysql not open for networking (http://www.linuxquestions.org/questions/linux-server-73/mysql-not-open-for-networking-766732/)

dannyor 11-04-2009 03:38 AM

mysql not open for networking
 
Hi.

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
Trying 192.168.1.3...
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

Hi

Edit the file /etc/mysql/my.cnf

Look for the line:
bind-address = 127.0.0.1

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

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 07:13 PM.