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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Changed mysql root password, now website won't load


8 Posts   1394 Views


18 October 2011 at 2:17am Community Member, 2 Posts

I hope someone can assist with this.

We had a working silverstripe website up and running but I had to reset the root password on the mysql database and now the site won’t load anymore. I should point out that the site was developed by someone else and I have very little knowledge of Silverstripe. From searching the internet I managed to turn on dev mode and I’m now getting a more descriptive error message which is “[Warning] mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES)”.

I’m assuming that because I changed the database password I now need to change the password on the Silverstripe end, does this sound likely? if this is the case I’m not sure how I go about it.

Can anyone help me with this please?



18 October 2011 at 2:22am Forum Moderator, 1796 Posts

try mysite/_config.php


18 October 2011 at 2:24am Community Member, 2 Posts

As soon as I posted this we figured out we were looking at the wrong _config.php. All working ok now.

swaiba thanks.


10 February 2012 at 5:44pm Community Member, 4 Posts

Sorry, I'm new to SilverStripe. Under the html root, there is no _config.php file, but there is one under /cms/ and others. I don't see in that file where I might change the database password. Where / how can I change it in the SilverStripe config?

Please help as my site is disconnected from the database right now.

Thanks in advance.


10 February 2012 at 8:44pm Forum Moderator, 1091 Posts

Hi signals,

try /mysite/_config.php , near the top of the file...


11 February 2012 at 7:24am Community Member, 4 Posts

Thanks, martimiz, but there is nothing in that /cms/_config.php. Perhaps it would help to know what a typical _config.php file should look like and what wording I should be looking for in it to change the password.

Any help is appreciated.



11 February 2012 at 11:40pm Forum Moderator, 1091 Posts

Right... but, I did say /mysite/_config.php not /cms/_config.php :-)

In SilverStripe every module has its own _config.php, used for settings relating to that particular module. Basic modules are: sapphire (the framework) and cms (the backend) You'll probably never have to change any settings in their (core) config files

mysite is the module that manage your specific website. In the mysite/_config.php file you'll find basic things like the database settings, the default language and the basic theme. Look for something like:

global $databaseConfig;
$databaseConfig = array(
   "type" => "MySQLDatabase",
   "server" => "localhost", // or your mysql server address
   "username" => "xxxxx",
   "password" => "xxxxxx",
   "database" => "xxxxxx",

If you want to get any deeper into SilverStripe, I strongly advise you to check out the tutorials


12 February 2012 at 10:48am Community Member, 4 Posts


Thanks for your patience on this one. That is very helpful.

I don't have time to log in now but I will check. I don't believe I saw a directory called /mysite as that would have been obvious to me from what I'd been reading. That's why I figured /mysite was a placeholder for whatever the site name or directory name was. I will look again this weekend and let you know.