You've just reset your mysql root password. Now, lets put back the launch daemon so we have our MySQL at the ready again: launchctl load -w ~/Library/LaunchAgents/Ĭongratulations. If all went to plan it should say: Query OK, 1 row affected (0.02 sec)Įxit out of the MySQL prompt. mysql> update er set password=PASSWORD('new_password_here') WHERE user='root' Log in and set the password mysql -u rootĪt the prompt, enter the following MySQL command to set a new password for the effected user. Once you have done this, you now should have a running, unprotected MySQL instance up. Note that if when you run echo $(brew -prefix mysql) and it does not respond as "/usr/local/opt/mysql" in bash, you will need to adjust the path accordingly. Now start mysql by hand skipping the grant tables and networking $(brew -prefix mysql)/bin/mysqld_safe -skip-grant-tables -skip-networking Stop the currently running MySQL instance launchctl unload -w ~/Library/LaunchAgents/ In case you have inadvertently set and forgot the root password, and you don't want to wipe all your databases and start over because you are lazy and forgot to have a back up solution in place, and you are using a fairly recent Homebrew install (Winter 2013), here are steps to reset your password for MySQL.
0 Comments
Leave a Reply. |