2

I downloaded and installed mysql-5.7.16-osx10.11-x86_64.dmg and I am running MySQL with Pref Pane: http://dev.mysql.com/doc/refman/5.7/en/osx-installation-prefpane.html

And I have attempted to follow the instructions on this page (Section B.5.3.2.2 Resetting the Root Password: Unix and Unix-Like Systems) http://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html

Supposedly, completing steps 1 to 5 running shell> mysqld_safe --init-file=/home/me/mysql-init & will reset my root password but it doesn't do anything. I've also attempted step 6 to no avail.

  • Yes. I stopped MySQL server from Pref Pane and then performed steps 3 to 5, then I restarted MySQL server from Pref Pane before trying my new password, but it does not work. – allenylzhou Nov 24 '16 at 1:17
  • @ITSolutions did the steps work for you? – allenylzhou Nov 24 '16 at 1:31
  • just to ensure, the text file you created wasn't really named: '/home/me/mysql-init' was it? – mcalex Nov 24 '16 at 4:40
  • It was not. It was created in my home direction ~/mysql-init and the command I used was mysqld_safe --init-file=~/mysql-init & – allenylzhou Nov 24 '16 at 6:00
  • What happens if you run the cat /mysql-data-directory/host_name.pid command (without the kill and backticks, just on its own)? If you get some number, then mysql is still running. Also, like my last question, that wasn't the actual text you used inside the kill command, was it? – mcalex Nov 24 '16 at 6:27
2

When I ran mysqld_safe --init-file=~/mysql-init &, mysqld_safe Logging to '/usr/local/mysql/data/Zhous-MacBook-Pro.local.err' was printed to the console.

Tailing the error log, I found that it could not find mysql-init because it does not recognize ~ as home. I changed the path to /users/Zhou/mysql-init and it worked like a charm.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.