1. Add System path
Download after installing DMG, it is not possible to use the instructions directly, because the directory is not added to the environment variable
- Terminal Type cd ~
- Touch. Bash_profile
- Open-e. Bash_profile
- This file is opened in TextEdit (this should be a blank document if the environment variable has not been previously configured). If you have content, enter it before the Terminator, and if there is no content, enter the following statement directly:
- Export Path=${path}:/usr/local/mysql/bin
- Save, exit TextEdit, Exit terminal
2, the terminal to modify the MySQL password
- Shutting down the MySQL server
Sudo/usr/local/mysql/support-files/mysql.server stop
Cd/usr/local/mysql/bin
sudo su
./mysqld_safe--skip-grant-tables &
Control + D Exit Edit
Alias Mysql=/usr/local/mysql/bin/mysql
Mysql
Use MySQL
Flush privileges;
Set password for ' root ' @ ' localhost ' =password (' new password ');
MySQL installation (for Mac)