17488 Posts in 4473 Topics by 1978 members
Archive
SilverStripe Forums » Archive » 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
Our old forums are still available as a read-only archive.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 3203 Views |
-
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

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.
-
Re: 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

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?
-
Re: 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

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.
| 3203 Views | ||
|
Page:
1
|
Go to Top |


