View Full Version : External mysql database problem

July 29th, 2008, 02:47 PM
I have a strange problem.. I want to seperate my webserver from my database server, but for some reason it just doesn't want to connect.

I have a webserver ip that is and a databaseserver ip of So, I used instead of localhost, and I have followed this (http://www.vbulletin.com/forum/showthread.php?t=185705) topic to give the right permissions to the webserver. Yet still it refuses to work.

The exact error is "Can't connect to MySQL server on '' in [dir] on line [x]"

So, I have the right IP's, the right permissions, but somehow it doesn't connect.

Thanks in advance!

July 29th, 2008, 04:21 PM
you have to grant a remote connection on your mysql server, there is a table (i guess it's called hosts) in your mysql database, where you have to make an entry to allow the remote host to log in.

July 29th, 2008, 05:35 PM
If you mean the USER_PRIVILEGES table.. I have already done that. But if that wasn't correct I suppose I would've had a permission error, some sort of access denied. The problem more lies in the fact that it can't find my computer on the network, even though it's there...

It might be useful to say that the webserver is (sadly) windows with a WAMP server, and the databaseserver runs on Ubuntu. Both have the packages installed and working, so that can't be the problem...

Any other suggestions?

July 29th, 2008, 05:47 PM
Try commenting out the "bind-address" in /etc/mysql/my.cnf by putting a # sign at the beginning of the line:

#bind-address =

Then restart the mysqld server with

sudo /etc/init.d/mysql restart

If that does not work, perhaps try the suggestions here: http://dev.mysql.com/doc/refman/5.0/en/can-not-connect-to-server.html

July 30th, 2008, 12:52 AM
Thanks a LOT!! It works perfectly, I'll remember this one ;-)

Again, thanks!