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.
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, 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.
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:
$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 http://doc.silverstripe.org/sapphire/en/tutorials/
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.