Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Hosting Requirements /

What you need to consider when choosing a hosting provider and plan.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

is it possible to use MySQL database hosted on another ISP from the silverstripe site?

Go to End

12 Posts   6439 Views


Community Member, 33 Posts

24 December 2009 at 9:20am

Edited: 24/12/2009 9:42am

Hey all,

Just like the title says, is it possible to connect to a MySQL database which is hosted on a different ISP to the ISP that Silverstripe is hosted on?

Specifically my mate has his site hosted on one of the new Telecom hosting plans, but they use MSSQL. So was thinking I could connect to the MySQL database that's hosted on my isp!?



Community Member, 791 Posts

25 December 2009 at 1:24am

Doubtful , since the ISP that hosts your database probably does not allow direct connections to the MySQL server.


Community Member, 182 Posts

11 January 2010 at 8:47am

I've done it with loads of sites, you just need to put:
Rather than localhost in the _config.php file.

You may also need to allow the connection, on my cpanel on my MySQL host I just added the IP address and domain name from the control panel of my SS host.

I got stuck with one and the hosting company sorted it for me.
Need help or better instructions let me know!


Community Member, 33 Posts

13 January 2010 at 11:52am

Edited: 13/01/2010 11:53am

Cheers pinkpoliceman! I had a feeling it must be possible.

I've asked the hosting company to allow access for the for the websites IP address and domain and have also updated the details in the _config.php, but when installing silverstripe ( and after re-checking the requirements I am presented with a blank white page that doesn't do anything.

I'd just like to check that the 'localhost' line I need to change is:


Looking forward to your reply! Cheers.


Community Member, 182 Posts

13 January 2010 at 12:07pm

hi supermegaultra,

no not that part here is an example of the _config.php in the mysite folder.


global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
	"server" => "", 
	"username" => "your_username_for_that_db", 
	"password" => "your_password_for_that_user", 
	"database" => "your_MySQL_DB",

// Sites running on the following servers will be
// run in development mode. See
// for a description of what dev mode does.

// This line set's the current theme. More themes can be
// downloaded from



When you installed SS, you should have entered the details as above, (if that corresponds I don't the install screen to look at right now), the part you said just leave as is. Im not sure if you need the 'www.' when you enter the server address I haven't so far.
This includes some debug stuff which i find helpful.

Hope that's helpful! let me know if not!


Community Member, 33 Posts

14 January 2010 at 9:11am

Thanks again!

I'm still unable to get Silverstripe to install and connect to the remote MySQL database, but I think it could be something to do with the hosting company not adding the IP address and domain name properly. I will check with them once they're back from holidays.

Just to double check - the database server name I'm connecting to is '' and the database name is 'jacksmachinery'. I have connected to this before perfectly using a silverstripe installation that is hosted on the same domain ( Perhaps I should make another MySQL database alongside the 'jacksmachinery' one?

Thoughts? Cheers!


Community Member, 182 Posts

14 January 2010 at 9:23am

Yeah there's no harm in setting up another db.
When you try and install what message do you get? This could determine whether or not it is even finding the server or the db etc..?


Community Member, 33 Posts

14 January 2010 at 9:32am

Ahh no it's not finding the database at all. I've tried '' along with plain old '' too.

Error message I recieve is "Can't find the a MySQL server on '': Unknown MySQL server host '' (11004)"

Perhaps I'll wait until I have heard back from the hosting company that looks after the MySQL server and double check that they have the right IP and DNS.


Go to Top