Problem:
With a fresh install of MySQL v5 I cannot log in as root user. Since its a fresh install, there should be no password in existence for root. I try with mysql -u root so I can then assign a password for security, then hit enter. My bash profile is already set up correctly.
Stuff I've done to try to fix it:
MySQL AB :: MySQL 5.0 Reference Manual :: B.1.4.1 How to Reset the Root Password
I've tried both of the ways they suggest for Unix (by nixing the .pid file and starting up my skipping grant tables.
I've tried this:
mysqld_safe --user=mysql --skip-grant-tables &
Then Execute these statements.
mysql -u root mysql
mysql> UPDATE user SET Password = PASSWORD('your_new_password') where USER = 'root';
mysql> FLUSH PRIVILEGES;
Everytime I get permissions denied for any files in my 'data' directory. The data folder is owned by 'mysql' user with a group of 'wheel'. That is the default privileges on install.
While futzing around before I managed to execute the above suggestions by changing the owner to my User name, and the group to mysql. However, even with the UPDATE script setting a new password, I couldn't get in with the one I set.
I know its confusing, but if this looks familiar to anyone, please please help me. A friend of mine mentioned having the same problem and she just gave up, but I'm determined to get this to work.
And I have tried uninstalling with the sudo rm commands and reinstalling several times with the exact same results.
My firstborn goes to anyone who helps solve this... (or maybe just a six pack).