Build a MySQL environment on the OS X Platform
References:
The simplest way to install MySQL on OS X is to download the Community version DMG package from the official website. The latest version is version 5.7, the installation method has been introduced in reference material 1, but the version 5.5 installation is introduced. The difference is that only one installer is required for version 5.7 installation, rather than installing several programs in 5.5, the installation process is simpler.
After the installation is complete, a dialog box is displayed, as shown in. A default logon password for the local root account is provided. The password is randomly generated and needs to be modified upon the first login. Of course, MYSQLWorkbench is used, it is easy to modify.
After the installation is complete, do not rush to log on to MySQL, because this service is not enabled by default, otherwise the following error message is displayed.
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql. sock' (2)
First, you need to find the installed mysql setting options in "system preference settings" of OS x, as shown in.
Select this option. The dialog box shown in appears. The current status is "stopped". Click the "" button next to it. After Entering the administrator password, you can see that the mysql service has been started. You can log on to mysql through the command line or client to perform database operations.
This article permanently updates the link address: