Question:
i changed config.inc.php of phpMyAdmin but it seems doesn't work...?
nutritionalHealing
2007-12-12 19:17:05 UTC
below is part of my config.inc.php;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['compress'] = FALSE;
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';

but when i restart my phpMyAdmin by restarting wampserver2, it still show "#1045 - Access denied for user 'root'@'localhost' (using password: NO)" it seems the changes doesn't reflect on myPhpAdmin... anyone can tell me what i should do?
Six answers:
Robin T
2007-12-12 19:30:26 UTC
Remove the username 'root' from the config file.

i.e.: $cfg['Servers'][$i]['user'] = '';



Your 'auth_type' is set as 'http', so it should pop up a window asking for your MySQL username and password to do the authentication. You need to fill in the 'user' and 'password' fields only when you're using auth_type 'config', which is not recommended because it's not secure (anyone can access it without entering username and password).



------------------------

Questions regarding your additional details:



- Are the web server and database server both located on 'localhost'?



- Do you get this error when you restart wampserver2 or when you go to the phpMyAdmin page from your browser?



- You are not sure that phpMyAdmin is really reading that config.inc.php file. So let's make sure that it is first. Type in some random characters in that file, and go to your phpMyAdmin page. If you get 'parse error' then at least we know that the config is being read.



By the way, if you simply change phpMyAdmin's config file, you just need to reload the page on the browser; you don't need to restart Apache or MySQL or the whole wampserver.
anonymous
2007-12-12 19:22:42 UTC
It's been awhile since I've used phpMyAdmin, but I believe that error is occurring while it's trying to connect to mysql. For instance, if I login to my FreeBSD server as root, and simply type 'mysql', I get the following:



# mysql

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)



This is because I've not specified the password for the user to login with.



You could try setting the password value to your root password, assuming it's not already there and you've just taken it out for the sake of posting. I don't think this is the case, however, because if I login specifying an incorrect password, I get the following:



# mysql -u root -p

Enter password:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
?
2016-10-11 08:23:33 UTC
CBS took over the Yankees after their first 20 championships and in the late 60's and early 70's under CBS they have been undesirable for the 1st time considering that they first became a team. and many years they weren't basically undesirable they have been god undesirable. luckily the reign did no longer final long as CBS quickly offered the team to a minimum of one George M. Steinbrenner. As they are asserting, something is historic previous.
KeWr
2007-12-12 19:29:51 UTC
You need to add the user root and host localhost to your securities.

There are a few ways do to this...do you have ssh / shell access?

If not, webmin? Anything else bu phpmyadmin?
Trev
2007-12-12 19:59:52 UTC
Don't run mysql as root

create alternative user name with permission set to the minimum levels needed to do that particular job
?
2016-12-17 10:53:52 UTC
Auth_type Phpmyadmin


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...