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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

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

Fatal error: DATABASE ERROR: Couldn't connect to MySQL database in C:\wamp\www\silverstripe-v2.2.3\sapphire\core\model\Database.php on line 431


Go to End


3 Posts   5802 Views

Avatar
Brigham

Community Member, 5 Posts

9 December 2008 at 1:40pm

Kia ora (it means hi). I am installing SilverStripe for the first time and went to my browser, inserted the URL: localhost:3000/silverstripe-v2.2.3/. It did what is was suppose to do, i ticked the "empty template, ready to begin the tutorial", clicked on "Install SilverStripe" and got a page that said a whole lot of things, one of them being something like: if this doesn't work, refresh your browser--i did and then ticked the "empty template..." box again and clicked "install SiverStripe" then got this page and it won't do anything else:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) in C:\wamp\www\silverstripe-v2.2.3\sapphire\core\model\MySQLDatabase.php on line 41

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\silverstripe-v2.2.3\sapphire\core\model\MySQLDatabase.php on line 42

Fatal error: DATABASE ERROR: Couldn't connect to MySQL database in C:\wamp\www\silverstripe-v2.2.3\sapphire\core\model\Database.php on line 431

---

any recommendations on what i need to do now? Thanks.

Avatar
Hamish

Community Member, 712 Posts

9 December 2008 at 3:26pm

have a look at /mysite/_config.php

First of all, it should exist. If not, run the installer again.

Second of all, it should contain something like

$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "localhost",
"username" => "root",
"password" => "",
"database" => "blahblah",
);

make sure all those details are correct.

Third of all, are you sure your mysql database is running and accessible with the supplied credentials?

Avatar
Brigham

Community Member, 5 Posts

9 December 2008 at 9:42pm

Thanks for your reply. the /mysite/_config.php does not exist. I tried re-installing it and still the same. I viewed the video and followed those instructions (installed wamp; unzipped SilverStripe; put it in the www folder; copied some file; changed its name..... and then error. Very sure i followed the video exactly.