PDA

View Full Version : Can't Login to MySQL


ultrabob
01-20-2004, 09:14 AM
Hi All,

I'm sure someone will think this is a pretty stupid question, but I have never encountered anything like it, and google didn't turn anything up for me so I thought I would try here.

I am preparing a new server (FreeBSD, MySQL 4.1.1) and I can't connect to the server. I was able to connect for a little while, and I set the root passwords and removed the guest accounts. Things were going fine until I shutdown mysql and restarted it a bit later (can't remember what exactly I did in the meantime).

Now when I try to connect to the mysql server '

mysql -u root -p

' I get this:

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

I checked the log file in
Code:

/var/db/mysql/hostname.err

and I see the following:
Code:

040119 22:05:18 mysqld started
040119 22:05:19 InnoDB: Started; log sequence number 0 43902
040119 22:05:19 Found 4.1 style password for user 'root@localhost'. Ignoring user. You should change password for this user.
040119 22:05:19 Found 4.1 style password for user 'root@hostname'. Ignoring user. You should change password for this user.
/usr/local/libexec/mysqld: ready for connections.
Version: '4.1.1-alpha' socket: '/tmp/mysql.sock' port: 3306


I don't have any data on the server right now, so I don't mind wiping and reinitializing if that is what it takes, but

1) I'd like to know what is wrong
and
2) I haven't had any luck reinitializing

Any help would be greatly appreciated!

UltraBob

raf
01-20-2004, 11:58 AM
Welcome here!

Did you check
http://www.mysql.com/doc/en/Access_denied.html

ultrabob
02-03-2004, 03:36 AM
Hi sorry for the long delay in posting my solution. I never found out why mysql went wacky on me, but I did a priveledges reset using the instructions on this page:

http://www.mysql.com/doc/en/Resetting_permissions.html

I wasn't able to use the mysqladmin method listed, but restarting the mysql client with --skip-grant-tables did the trick.

Thanks for all the responses.

UltraBob