Need to install a MySQL on this machine (MAC), see the compact version of the smallest volume, the results into a manual installation of the pit (normal interface can be installed, but the installation directory will be/usr/local/mysql), since into the pit to fill it.
1, extract to their own choice of directory, such as/data/mysql.
2, initialize the database: Sudo/data/mysql/bin/mysqld--initialize--user=mysql. The root default password is generated, please log it and modify it later
3. Copy the configuration file to/data/mysql/bin:cp/data/mysql/bin/mysql_config/data/mysql/bin/my.cnf
4, modify the default related directory in the configuration file to point to their own installation directory, such as Ldata= '/data/mysql/data ', to change the Ldata, Execdir, Bindir, Pkglibdir, Plugindir, Pkgincludedir
5. Start Mysql:/data/mysql/bin/mysqld &
6. Change the root password:
A, login mysql:/data/mysql/bin/mysql-u root-p, #输入之前记录的root密码
B, modify the root password: set password for ' root ' @ ' localhost ' = ' 123 '; #此处网上有坑: If you use password (' 123 ') you will get an error.
Install MySQL manually