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.

5
  • 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. Commented Nov 24, 2016 at 1:17
  • @ITSolutions did the steps work for you? Commented Nov 24, 2016 at 1:31
  • just to ensure, the text file you created wasn't really named: '/home/me/mysql-init' was it?
    – mcalex
    Commented Nov 24, 2016 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 & Commented Nov 24, 2016 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
    Commented Nov 24, 2016 at 6:27

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .