Slightly OT, Issue with mysql 5.0 and root password

Since upgrading my MacBook to leopard I've been experiencing a frustrating issue with MySQL.

I installed rb-mysql using macports, which installed mysql 5 as well.

The problem is that unlike before I can't get into mysql as the root user without explicitly providing a root password, even though the root password is empty.

Macintosh:test rick$ mysql5 -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Macintosh:test rick$ mysql5 -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 19 Server version: 5.0.51 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

Since this is a development only machine, I really want to have an empty root mysql password. Before, logging in as root worked with no -p option.

This issue seems to be wreaking havoc with my ability to run Rails regression tests.

Has anyone seen this and have any insight as to how to get MySQL 5 to work without prompting for a blank password?

The problem is that unlike before I can't get into mysql as the root user without explicitly providing a root password, even though the root password is empty.

Macintosh:test rick$ mysql5 -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

<...>

Looks like wrong password is provided even if you don't specify it. Can you check MySQL configuration files, maybe macports installer put options into it? Look for /etc/my.cnf, ~/.my.cnf, $MYSQL_HOME/my.cnf if you see something like:

[client] user = root password = sometpass

that may be it.

Regards, Rimantas

Thanks, that was basically it. I figured it out earlier today.