Tutorial on installing mysql5.7.18 on mac os10.12, os10.12mysql5.7.18
I found all kinds of pitfalls on the Internet and failed to solve my problems. Finally, I figured it out.
After the installation, a temporary password will pop up and copy it. If you have a chance in the notification bar, you can only watch your hand in the notification bar. If the notification bar is gone, you can only reinstall it as soon as possible. (Uninstall it Before reinstallation)
Then, open the console and enter mysql. The command not found prompt is displayed. Then, enter
alias mysql=/usr/local/mysql/bin/mysqlalias mysqladmin=/usr/local/mysql/bin/mysqladmin
Start an alias. Note that you need to re-run the command on one side after the terminal is disabled (to permanently Save the command to the bash file)
Then enter mysqladmin-u root password *** (*** Replace with the temporary password)
An error is reported.Error: 'Access denied for user' root' @ 'localhost' (using password: NO )'
A bunch of Baidu is neededEnable root user for mac OS(Enable the method and search for it yourself)
Enter su root after enabling
Enter the root password to enter the root mode.
Enter mysqladmin-u root password *** (*** Replace with the temporary password)
The result is command not found.
Finally, in root Mode
sh-3.2# alias mysql=/usr/local/mysql/bin/mysqlsh-3.2# alias mysqladmin=/usr/local/mysql/bin/mysqladminsh-3.2# mysqladmin -u root -p password
Enter the temporary password
Then prompt to enter the new password
Complete the installation.
Summary
After installing mysql, set the system preference to start the service.
Then enterRoot Mode
sh-3.2# alias mysql=/usr/local/mysql/bin/mysqlsh-3.2# alias mysqladmin=/usr/local/mysql/bin/mysqladminsh-3.2# mysqladmin -u root -p password
Enter temporary password
Enter New Password
Enter the confirmation Password
OK
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.