MAC installation configuration MySQL

Source: Internet
Author: User

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

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.