Question

I have a webserver which support MSSQL only. I need to install WordPress on the server. Thus I wonder if it is possible to use a distinct server for MySQL. I already tried it, but got error Error establishing a database connection.

So there are a couple of questions:

  • In theory, is it possible to install wordpress using a server for php and another for mysql?
  • Is it possible that the server providers have security restrictions so that any of the two wouldn't allow connection from the other?
  • Are there free server providers dedicated to MySQL? Could you please recommend (a preferably lightweight one) ?
Was it helpful?

Solution

Yes, you can use one server for your web server and another for your database. When you are configuring WordPress you would supply the hostname (or IP address) for the database server instead of localhost. This is a common set up that allows you to scale the two servers independently.

Your MySQL server will have to be configured to allow network connections. You'll also want to configure a firewall to only allow connections from your web server(s).

Amazon will host MySQL for you in the cloud, so will EngineYard. Google for "Hosted MySQL" for more results.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top