Install MySQL to MacBook

Source: Internet
Author: User

1. Download the installation package mysql-5.1.52-osx10.6-x86.dmgfrom http://dev.mysql.com/downloads/mysql/

2. Double-click the installation package. One of the four files is the description document.

3, first click Install mysql-5.1.52-osx10.6-x86.pkg, this is the main installation package of MySQL. Generally, the installation file automatically installs MySQL under/usr/local. For example, clicking run mysql-5.1.52-osx10.6-x86.pkg will install mysq into/usr/local/mysql-5.1.52-osx10.6-x86. The installation is complete by default.

4. Click to install the 2nd file mysqlstartupitem. PKG, so that MySQL will automatically start at startup.

5. Click to install MySQL 3rd files. prefpane. In this way, the icon "MySQL" is displayed in "system setting Preferences", through which you can set whether MySQL starts or stops and whether it runs automatically at startup. MySQL is basically installed.

6. Switch to the root user su root and enter the password.

7. Run chmod + w/etc/bashrc to modify the permission of the file to be writable by the owner.

8. Run "VI/etc/bashrc" and add the alias of MySQL and mysqladmin to the bash configuration file.

9. Click "I" on the keyboard as the inserted state and copy the following content:

#mysql       alias mysql='/usr/local/mysql/bin/mysql'       alias mysqladmin='/usr/local/mysql/bin/mysqladmin' 

10. Click ESC on the keyboard and enter: X to save and exit.

11. Run PWD to check whether the current directory is etc. If so, enter chmod 444 bashrc and press Enter.

12. After installing le, the default MySQL Root Password is blank. To set the password, Run "mysqladmin-u Root Password" 123456 "on the terminal, 123456 is the root password.

13. Start the MySQL Service

14. Enter mysql-u root-P on the terminal and enter the password.

Post: http://cainwise.iteye.com/blog/814973

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.