Mysql not requiring root password

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I'm running MySQL server 5.1 on Ubuntu 10.04LTS 64-bit. Since
installing the server say, about 6 months ago, I've happily
administered the databases using "mysql -u root -p <database-name>". I
would type in my password and go to work. Today, I accidentally forgot
the "-p" on the command line and ... I got a mysql prompt anyway! So I
tried, "mysql mysql" and got the prompt again!

So, let's say for the sake of argument my password is "mysqlpass":

mysql -u root -p mysql <type in "mysqlpass">: GET PROMPT
mysql mysql: GET PROMPT
mysql -u root -p mysql <type in *wrong* password>: DENIED

What I've done to troubleshoot:

Looked at another 10.04LTS server I have with mysql 5.1 installed.
Checked mysql and mysqld executables. Same time stamps and sizes. (By
the way, when I type "mysql mysql" I do *not* get the mysql prompt on
this server, which is the behavior I expect).

Looked through the /etc/mysql files for some setting that might be
causing this. I didn't see anything, but I am definitely not an expert
so I could have missed something.

Did mysqladmin -u root password <password> -- no change.

Did mysql mysql -> update user set Password=password('<password>');
flush privileges; <even restart server> -- no change.

If I do 'select Password from user where User="root"', the password
seems to be set properly. The same password on the second server shows
the same encryption string in the Password field.

Any ideas?

Site Timeline