views:

43

answers:

1

I have set up my wordpress site on my local machine and I would like it to talk to the live mysql database on the server. I accessed the wp-config.php file on my machine and changed the hostname to use the ip address instead of localhost, but it will not work.

What do I need to do?

+3  A: 

It could be that your remote database is configured to accept connections only from localhost for security reasons. Most web providers set it up that way. In that case, you have no chance of making this work.

Anyway, even if you would get it to work, you will encounter two problems: It will be awfully slow, and the HTML served by the remote database will contain references to server URLs (as opposed to local ones).

If you need more detailed information, you will need to post any error messages you get from mySQL.

Pekka
I have set up the database to allow connections from any host. The speed wont be an issue. I dont get any error messages it just fails to connect. I have tried connecting through various mysql gui's also and still no joy.
CeejeeB
@CeejeeB if the connection attempts time out, then it is most likely a firewall issue, either on your client PC's, or the server's end (more likely).
Pekka