PDA

View Full Version : mySQL connection does not work when connecting as "root



pnat331
04-21-2004, 08:34 AM
Hi:

I'm unable to connect to mySQL, from a command line, either as a user or even as root. I tried changing the /etc/my.cnf files as well as the passwords using PHPmyAdmin, but nothing seems to work.

What am I doing wrong and what should I be looking for to correct this problem?



mysql -Uroot
ERROR 1045: Access denied for user: 'root@localhost' (Using password: YES)

Thanks much,
Prakash

torrin
04-21-2004, 09:19 AM
Did you try . . .

mysql -u user -p

The -p tells mysql to ask for a password.

FZ
04-21-2004, 03:05 PM
Prakash,

If you are sure you are using the right password(s), and the user "root" hasn't been deleted in your mySQL privileges, then make sure you haven't changed the "host" value for the user root (should be "localhost", yourdomain.com and your IP address).

Other things you can try: http://www.mysqlfreaks.com/errors/55.php

Also, have you tried restarting mySQL? (You can type restart at the SSH "command prompt" and press enter).