Install and configure MySQL under Mac

Source: Internet
Author: User
Tags safe mode

Steps:

1. Download MySQL installation package MYSQL-5.7.13-OSX10.11-X86_64.BMG installation

2, after the completion of installation terminal input:

MySQL--version

----Show the version number is normal, if the command not found, in the terminal input as follows, "/usr/local/mysql/bin/mysql" is the MySQL default installation path:

$ cd/usr/local/bin/

$ sudo ln-fs/usr/local/mysql/bin/mysql mysql

3. Turn off the MySQL service:

Sudo/usr/local/mysql/support-files/mysql.server stop

4, configure the root account password, the default is not configured,

-----Input in terminal (start MySQL in safe mode):

Sudo/usr/local/mysql/bin/mysqld_safe--skip-grant-tables

-----Change Password, terminal input (progressive input, must, "* * *" for the Set password):

Mysql-u rootupdate mysql.user SET authentication_string=password (' * * * * * ') WHERE user= ' root '; FLUSH privileges;\q

5, after the completion of configuration verification, in the terminal input:

Mysql-u root-p

----Prompt for password, enter MySQL instructions successfully!

Mysql>

6. mysql service startup and shutdown can be operated in System Preferences, the Terminal command is as follows:

$ sudo/usr/local/mysql/support-files/mysql.server start$ sudo/usr/local/mysql/support-files/mysql.server Stop

Install and configure 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.