Hi. Thanks for looking.

I am setting up a dedicated server for the first time to host a site and I have the FTP accounts set up, the PHP and MySQL packages installed. MySQL administrator GUI tool installed but I cannot get phpMyAdmin to work.

I have unzipped it and put it in the root of the website folder in a folder named phpmyadmin. However when i type http://localhost/phpmyadmin/index.php into the browser on the dedicated server I always get a error.

#1045 - Access denied for user 'root'@'localhost' (using password: NO)

I have searched the web for two days trying to get this. I have tried changing the [auth_type] settings and I have the user set as root and password as password. These settings allow me to access the MySQL Administrator GUI tool OK.


Can anyone please help me here. This is sort of a last resort.


Thanks in advance.

Member Avatar for langsor

Okay, I'm running Apache on Windows XP with Perl and PHP 5 and MySQL 5 and just installed PHPMyAdmin 2.9.2 to test your problem ...

A couple things, make sure you are using the file in libraries/config.default.php and not the config.sample.inc.php version, because they both use different authentication methods, and I find the first one easier than using cookies ... :-)

In the file make sure these lines look like this (replacing <password> with your password 'secret_word' or whatever)

$cfg['Servers'][$i]['auth_type']  = 'config'; // Authentication method (valid choices: config, http, HTTP or cookie)
$cfg['Servers'][$i]['user']  = 'root';  // MySQL user
$cfg['Servers'][$i]['password']  = '<password>';

That's all I did and it started right up for me.

Hope this helps

hi langsor,

I think I may have adapted the sample version.

But I have included the 3 lines of code in it as you showed. My dedicated server is using IIS, that is the only difference from your setup that i can see.

It is also weird as I get the error message when I type the URL with the index.php while when I just finish with phpmyadmin/ then it brings up phpMyAdmin (found that out after I posted). But even when phpMyAdmin comes up it complains about missing DLLs which I have placed in the ext folder. And i have checked the path is correct in PHP.ini.

I have asked the guy who set the server up for some advice and help. hopefully it gets solved on Monday. Really annoying me as the same setup on my local iMac went fine and is working.


Thanks for replying.

Member Avatar for langsor

My first config attempt was also to alter the config.sample.inc.php but that gave me the same error as you have ... so I looked in the other file and it worked out of the box just adding my root password ... so here I'm uploading a clean copy as an attachment so you can try it too.

Other thoughts, I recall setting up the MySQL database using the Windows installer some various options you could set that might make it incompatible with the PHPMyAdmin utility, like the port number, and stuff like that ... could be messing you up too. ?

Hope it helps.

commented: Helpfull. Took time to try out problem +1

Thanks very much. I'll use the file you uploaded on Monday and will post if it works or not in case a few other people are having a similar problem.

Thanks again.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.