-Download and install the community editions of MySQL and MySQL Workbench.
2. If MySQL Workbench cannot be logged in, go to System Preferences-MySQL-Initialize Database and select the option starting with legacy.
Three add environment variables
# Check if there is a mysql script in the directory cd /usr/local/mysql/bin # Open the user environment variable file, enter PATH =$PATH:/usr/local/mysql/ bin, and save vim ~/.bash_profile # Make the configuration file take effect immediately source ~/.bash_profile # print environment variables echo $PATH
Four System Preferences - MySQL, Start MySQL