I can't open index.php in localhost.That’s my problem below, but I’v setuped Apache+PHP+MySQL+Perl.Who can help me?

Unable to connect to database server
This either means that the username and password information in your settings.php file is incorrect or we can't contact the MySQL database server. This could mean your hosting provider's database server is down.

The MySQL error was: Access denied for user 'username'@'localhost' (using password: YES).

Currently, the username is username and the database server is localhost.

Are you sure you have the correct username and password?
Are you sure that you have typed the correct hostname?
Are you sure that the database server is running?
For more help, see the Installation and upgrading handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

Comments

sun’s picture

Are you sure you have the correct username and password?

Daniel F. Kudwien
unleashed mind

Daniel 'sun' Kudwien
makers99

vnett’s picture

Modify the "settings.php" file,isn't is?But how can I do it?

sun’s picture

Open /sites/default/settings.php with a text editor and alter the following line

$db_url = 'mysql://username:password@localhost/databasename';

then upload settings.php to your webserver.

Daniel F. Kudwien
unleashed mind

Daniel 'sun' Kudwien
makers99

vnett’s picture

If mysql username:root,password:abcd
then

$db_url = 'mysql://root:abcd@localhost/databasename';

Right?