After installing the MySQL service (installation step can refer to series experience 1). Open System Preferences and click on the "MySQL" icon at the bottom.
- 2
In the MySQL dialog box, click the Start MySQL service button.
- 3
In the pop-up window, enter the administrator password, and then click the OK button.
- 4
In the MySQL dialog box, the status of the MySQL service appears as follows: The following status indicates that the MySQL service has been started.
END
To log in to MySQL using a terminal:
In the Finder's sidebar, click Applications, and then in utilities, double-click the start Terminal command.
In the terminal, enter the command to add the MySQL path:
Path= "$PATH":/usr/local/mysql/bin
The command to log on to MySQL at the terminal is as follows: Mysql-u root-p
Then enter the password, and if you do not set the password, press ENTER directly.
If the content is displayed as follows, it is already successfully logged into the MySQL service.
How to start MySQL on Mac