March 3, 2009

Is it possible to have your MYSQL database in a server different to the one that hosts your website?

mysql
reuben asked:


Is it possible to have your MYSQL database in a server different to the one that hosts your website? i.e., database in different hosting company/server . Or do both website and database have to been on the same server for the website to use the database??

Tags: , ,

Filed under Programming & Design by administrator

Permalink Print

Comments on Is it possible to have your MYSQL database in a server different to the one that hosts your website?

March 4, 2009

efremescu @ 3:54 am

They can be on different servers (machines) but it’s not practical for small websites. It is a custom practice for large websites with high traffic, they even split the database to multiple machines.

March 7, 2009

Mike S @ 7:25 am

Yes , it is possible.
You will need to change a security for a user to allow mysql access from remote machine and in connect clause use the server name instead of localhost. I have not seen any hosting providers which would allow this.

March 10, 2009

OpenSource @ 7:38 pm

It is possible. My current host actually keeps the mysql server seperate from the hosting server. Just change the db server from localhost to your server ip or name.