Access denied for user: 'username@localhost' (Using password: YES)

Access denied for user: 'username@localhost' (Using password: YES)

door Sailom V -
Aantal antwoorden: 7

After finished 7 of 10 items of the Installing Moodle, I try to reach my website at httt://127.0.0.1/moodle/admin

The problem is :

Warning: Access denied for user: 'username@localhost' (Using password: YES) in c:easyservwwwmoodlelibadodbdriversadodb-mysql.inc.php on line 175

The database details specified in config.php are not correct, or the database is down.


My System :

Windows XP Professional
FoxServ 3.1 beta 1 installed at C:\EasyServ
Moodle directory is C:\EasyServ\www\doodle

Please help, Thanks

Gemiddelde van de beoordelingen:  -
Als antwoord op Sailom V

Re: Access denied for user: 'username@localhost' (Using password: YES)

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
The error message is telling you what is wrong: "The database details specified in config.php are not correct"

I'm guessing that your MySQL username is not actually "username". glimlach
Gemiddelde van de beoordelingen:  -
Als antwoord op Martin Dougiamas

Re: Access denied for user: 'username@localhost' (Using password: YES)

door Sailom V -

Many thanks to Martin and John for your suggestions. The problem was solved by changing database setup to

$CFG->dbuser    = "sailomv";   
$CFG->dbpass    = "**********";   .


Other problems are : 


Warning: Failed opening '/theme//header.html' for inclusion (include_path='.;c:\php4\pear') in c:\easyserv\www\moodle\lib\weblib.php on line 625

ERROR: No lang file (/lang/en/moodle.php)!

ERROR: No lang file (/lang/en/moodle.php)!

lang:
 
Warning: OpenDir: Invalid argument (errno 22) in c:\easyserv\www\moodle\lib\moodlelib.php on line 1114

Warning: readdir(): supplied argument is not a valid Directory resource in c:\easyserv\www\moodle\lib\moodlelib.php on line 1115
  ERROR: No lang file 
 
and more ....

This is my "config.php"

$CFG->dbtype    = "mysql";      
$CFG->dbhost    = "localhost";  
$CFG->dbname    = "moodle";     
$CFG->dbuser    = "sailomv";   
$CFG->dbpass    = "**********";   

$CFG->prefix    = "mdl_";       


$CFG->wwwroot   = "http://127.0.0.1/moodle";


$CFG->dirroot   = "";

$CFG->dataroot  = "/moodle/data";

$CFG->buggy_referer = false;


I think there should be something wrong in my config.php that I had to edit "lib/setup.php" before this.

I understood that moodle need to setup only one "config.php" file.
 

Gemiddelde van de beoordelingen:  -
Als antwoord op Sailom V

Re: Access denied for user: 'username@localhost' (Using password: YES)

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
There is NO need to edit lib/setup.php

However, you do need to read the directions in config.php a bit more closely than you have been:

$CFG->dirroot = "c:\easyserv\www\moodle";
Gemiddelde van de beoordelingen:  -
Als antwoord op Martin Dougiamas

Re: Access denied for user: 'username@localhost' (Using password: YES)

door Sailom V -
Thanks Martin. Your recommendation of dirroot is working.  The new problem is how to connect  to the database.  I has no experience with MySQL (just only know about MS Access) and will spend much times  to study it. 
Gemiddelde van de beoordelingen:  -
Als antwoord op Sailom V

Re: Access denied for user: 'username@localhost' (Using password: YES)

door John Davidson -
You need to ensure that the mysql.inc.php file contains the correct MYSQL user details.

You also need to ensure that, when installed, MYSQL is set up witht he same username and password.

Assuming that you've done this, ten it may be an "easyserv" problem - I notice that the pathname you gave has no //slashes//

best wishes

John
Gemiddelde van de beoordelingen:  -
Als antwoord op John Davidson

Re: Access denied for user: 'username@localhost' (Using password: YES)

door Martin Dougiamas -
Foto van Core developers Foto van Documentation writers Foto van Moodle HQ Foto van Particularly helpful Moodlers Foto van Plugin developers Foto van Testers
I really appreciate everyone who answers questions in this forum (instead of just asking them!) but I do need to correct you in this case, John. glimlach

Firstly, the only file you need to modify is config.php ... the database details are in there.

Secondly, I think the backslashes in the original post were probably stripped automatically by a little PHP bug which I've hopefully just fixed in Moodle.
Gemiddelde van de beoordelingen:  -