1. Download
MySQL: http://www.mysql.com/downloads/
Select: MySQL Community Edition (GPL)
Download the Mac version and unzip the installation.
2. Installation:
To unzip the downloaded file, double-click on the boot to install it:
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/7E/DB/wKioL1cLLdnQVP7oAABarrAekj0683.jpg "style=" width : 150px;height:109px; "title=" 1.jpg "width=" "height=" 109 "border=" 1 "hspace=" 0 "vspace=" 0 "alt=" Wkiol1clldnqvp7oaabarraekj0683.jpg "/>
After installation, a temporary root password will be generated, and the temporary password I generated for this installation is: Haguogdbj4*g
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/7E/DD/wKiom1cLLSrwxUe3AAOdx9qz0lY152.jpg "style=" width : 500px;height:350px; "title=" 2.jpg "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1cllsrwxue3aaodx9qz0ly152.jpg "/>
3. Configure Environment variables:
1. Open terminal, enter: CD ~ Will enter the ~ folder
2. Then enter: Touch. Bash_profile After the carriage return is executed,
3. Re-enter: Open-e. bash_profile This file is opened in TextEdit (this should be a blank document if the environment variable has not been previously configured). If you have content, enter it before the Terminator, and if there is no content, enter the following statement directly: Export Path=${path}:/usr/local/mysql/bin
Then, save, Exit TextEdit (must be exited), close the terminal and exit. |
4. Turn on MySQL service
Search for "MySQL" in spotlight to find the information you need:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/7E/DD/wKiom1cLLTGxMrlxAAXNLr6kxM8346.jpg "style=" width : 500px;height:316px; "title=" 3.jpg "width=" "height=" "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1clltgxmrlxaaxnlr6kxm8346.jpg "/>
Check MySQL to open the control interface:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/7E/DD/wKiom1cLLTSRfW9vAAIJ9AVBXtU794.jpg "style=" width : 500px;height:235px; "title=" 4.jpg "width=" "height=" 235 "border=" 0 "hspace=" 0 "vspace=" 0 "alt=" Wkiom1clltsrfw9vaaij9avbxtu794.jpg "/>
Click the "Start MySQL server" button to open the service.
5, change the default root password:
With the MySQL service turned on, open the terminal and enter the following command:
1, Mysql-u Root-p
2. Enter the default password at the time of installation
3, mysql> SET PASSWORD for ' root ' @ ' localhost ' = PASSWORD (' Newpasssword ');
Note: In the third line of the command, Newpasssword is the new password you specified.
This article from "Woody Rose" blog, reproduced please contact the author!
0. Install MySQL under Mac