Install MySQL login MySQL website
Open website Download MySQL Community Server, select download below DMG file
Click Download, here is 8.0.11 version
Then select No thanks just start my download skip registration direct download
Installation steps
Open the Setup program
Always choose to continue
Select the first option in the configuration and set the initial password
Installation is complete.
Configuring the Environment
The MySQL service is turned on by default after the 8.0.11 version is installed, so you do not need to select MySQL and open the service specifically to System Preferences
The purpose of the environment configuration is to enter MySQL at the command line without entering cd/usr/local/mysql/bin/each time to enter the appropriate folder
Open a. bash_profile file with a text editor
vim ~/.bash_profile
Set path
After entering the text editing environment, press I to enter insert mode, enter
PATH=$PATH:/usr/local/mysql/bin
and save (vim, first press the ESC key, and then enter: WQ)
At the command line, enter
source ~/.bash_profile
The path configuration is complete.
Log in to MySQL
Open terminal, enter Mysql-u root-p
Enter MySQL by entering the password you previously set
Into success
Install Workbench Login Workbench Website
Login website https://dev.mysql.com/downloads/workbench/
Pull to the bottom.
Click Download to enter a new page
Click No thanks, just start my download skip registration start download
Installation steps
Open the Setup program
Drag the Mysqlworkbench icon to the applications to complete the installation
Test connection
Open the Installed Workbench
Click on the local instance 3306, if you can access this interface, instructions for installation complete
If the connection fails, you need to complete the following steps to restart MySQL
The first step
Click on the Apple logo in the top left corner, enter System Preferences, click the bottom point MySQL
In the new page, click Stop MySQL server to close the MySQL service
Step Two
Open Terminal input
cd/usr/local/mysql/bin/
Enter after carriage return
sudo su
To log in to administrator permissions, enter a password
Enter after carriage return
./mysqld_safe--skip-grant-tables &
To disable the MySQL authentication feature
Automatically restart MySQL after enter
When done, reopen Workbench Click Root instance 3306 to connect successfully
Mac install MySQL and Workbench