Mac installation Configuration Mysqlby white Shinhuata (http://blog.csdn.net/whiterbear) reprint need to indicate the source, thank you. Download installation
Go to the official website to download the community version of the MySQL installation file, mine is: MYSQL-5.6.25-OSX10.9-X86_64.DMG
Double-click the DMG installation, a pkg file appears, double-click the pkg file, continue the installation is complete.
System Preferences start stop service
To find the MySQL option in System Preferences, click the start and stop of the service that can be used for MySQL.
Set the password.
On the command line, enter:/usr/local/mysql/bin/mysqladmin-u root password The new password to update the password. The installation is completed initially without a password.
The command line uses MySQL.
- CD ~
- Vim. Bash_profile
- Input: Alias mysql= '/usr/local/mysql/bin/mysql '
Alias mysqladmin= '/usr/local/mysql/bin/mysqladmin '
and save.
To restart the terminal you can use: Mysql-uroot-p and then enter the password to log in using MySQL.
Of course this situation needs to be able to log in after the MySQL service has been started, otherwise it will be reported error 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' ( 2) error.
command line to start the MySQL service.
Input:sudo/usr/local/mysql/support-files/mysql.server start
The command line stops the MySQL service.
Input:mysqladmin-uroot-p (your password) shutdown
Or:sudo/usr/local/mysql/bin/mysqladmin-uroot-p (your password) shutdown
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
MAC installation configuration MySQL