Install MySQL on Mac

Source: Internet
Author: User

Download the latest MySQL Community edition

Official: http://dev.mysql.com/downloads/mysql/
It is recommended to download the DMG installation package for easy installation.
The latest version is 5.7.11.

Install MySQL
    1. Double-click the mysql-5.7.9-osx10.10-x86_64.dmg file to load the image
    2. Double-click Mysql-5.7.9-osx10.9-x86_64.pkg to start the installation
    3. The next step, you can install successfully
    4. Note: After the installation is complete, a dialog box will appear, telling us that a temporary password for the root account has been generated. Remember to save, or resetting your password will be cumbersome.
Start MySQL

Open System Preferences, you will find a more MySQL icon, click on it, will enter the MySQL settings interface:

After installation, the default MySQL status is stopped, closed, need to click the "Start MySQL Server" button to start it, after booting, the status will become running.
There is also a check box button below, you can set whether to automatically start MySQL when the system starts, the default is checked, it is recommended to cancel, save boot time.

Connect to MySQL via terminal
    1. Open terminal, append MySQL bin directory to path Path

      PATH="$PATH":/usr/local/mysql/bin
    2. Then log in to MySQL with the following command (the password is the temporary password that was automatically generated earlier)

      mysql -u root -p
    3. Login is successful, but when the command is run, an error will be made, prompting us to reset the password.

    4. Change password, new password is 123456

      set PASSWORD =PASSWORD(‘123456‘);
    5. Execute show databases again; it's normal.

Install MySQL on Mac

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.