0. Install MySQL under Mac

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.