Marvin Cummings wrote:
> I'm wondering if someone could help me figure out why I'm getting this error
> when attempting to use phpMyAdmin to connect to mysql:
> phpMyAdmin tried to connect to the MySQL server, and the server rejected the
> connection. You should check the host, username and password in
> config.inc.php and make sure that they correspond to the information given
> by the administrator of the MySQL server.
> MySQL said:
> #1045 - Access denied for user: 'root'@'localhost' (Using password: NO) or
> It doesn't seem to matter if I add a password or not. I'm able to connect to
> MySQL using both MySQLCC and MySQLAdmin using root and my other accounts so
> I know the passwords are correct. I'm trying to follow the documentation
> that came with phpMyAdmin but I'm obviously missing something. Would someone
> happen to have a detailed way of editing this file to allow connectivity?
> Many thanks in advance
Well, it does make a difference whether you use a password or not, and it
does make a difference whether mysql says "YES" or "NO", because
root@localhost either has a password or it doesn't.
In any case, I gather you can connect using
mysql -u root -p
from the command line by supplying the password when prompted. In that
case, root@localhost has a password, so you must supply it to connect as
root@localhost using phpmyadmin. First, make sure that the correct password
is set in config.inc.php. If the password is set correctly, phpmyadmin
should connect to mysql. If it fails, and mysql says "Using password: NO",
it means mysql didn't receive a password, but if mysql says "Using password:
YES", it means mysql received the password but didn't recognize it.
If you need further help, let us know the version of mysql you have, the
version of php, and the version of mysql included in php. One possibility
is that php is built against an older version of mysql than you are actually
using. The password format changed with mysql 4.1.