That question is a bit rhetorical, since the instructions are right here:
http://dev.mysql.com/doc/refman/5.0/en/resetting-permissions.html
Too bad they don't work on my installation.
I have MySQL installed on my MacBook Pro. I went to change the root account password, and something got screwed up so now I can't connect. The terminal window conveniently forgot what I did since I did some ls commands with very long printounts in and around all this, trying to even find where the damn thing's configuration file or databases are stored (like it's some big secret). The instructions in the manual don't work. This is what happens:
betaagamemnon:/ william$ sudo mysqld_safe --init-file=~/password
Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/betaagamemnon.pid
070914 19:35:58 mysqld ended
The password is not changed, as I cannot connect by typing "mysql -u root -p" and entering the password in my init file. I don't know if I have two mysql's in here or what, but for some reason the "whereis" command refuses to give me any results. This is what I have:
betaagamemnon:/ william$ cd /usr/local
betaagamemnon:/usr/local william$ ls -FG
bin/ lib/ php5/
etc/ man/ sbin/
include/ mysql@ share/
info/ mysql-5.0.41-osx10.4-i686/
I realize I should be using the mysql forums, but I already did and the helpful folks there are ignoring me. If worst comes to worst, is there some way I can back up my databases without being able to connect to the server, so I can just reinstall?
Posts
Just copy them somewhere else, re-install mysql, copy them back to the same place and then go set your user accounts and access permissions back up.
Well, that seemed promising. I got the database I need copied into a new installation and chmod'ed correctly, but for some reason I get read errors:
Where the permissions are like so (I set the group as admin so I wouldn't need to keep doing sudo just to browse):