Install MySQL experience under MAC

Source: Internet
Author: User

1. Install with homebrew:

install MySQL

Result Error:

Install mysql==> downloading http://dev.mysql.com/get/downloads/mysql-5.7/mysql-5.7.19.tar.gz/ from/http://cdn.mysql.com/Curl: (404 Not Founderror:download failed : http://dev.mysql.com/get/downloads/mysql-5.7/mysql-5.7.19.tar.gz/from/// cdn.mysql.com/

Then upgrade your homebrew:

Brew Update

After the installation is complete, and then the error:

Error:the ' Brew link ' step did not complete successfully

Could not symlink share/man/man8/mysqld. 8
/usr/local/share/man/man8 are not writable.

It's so bumpy ...

Workaround:

sudo Chown -R $ (whoami)/usr/local/ #重新link一次 $ brew link MySQL

Finally, the installation is complete.

2. Configure MySQL:

Enter the SQL instruction mode:

Mysql-uroot-p

Then error:

error:can'/tmp/mysql.sock'  (2)

Indicates that we did not start the MySQL service.

So start the service:

Mysql.server start

3. Set the root account password:

Mysql_secure_installation

Then the following configuration options appear:

(1)

which aresecure enough. Would do you like to setup VALIDATE PASSWORD plugin? Press y  for  for   for root here. New Password:re-enter new password:

Ask if you install Valldate PASSWORD This kit (can help you to verify the complexity of the password, set too simple will remind you), I did not install this package, enter directly after two password end.

(2)

 for  for   make the installation go a bit smoother. You should remove them before moving into a productionenvironment. Remove Anonymous users for No):

Do you want to remove anonymous users? Select Y.

(3)

normally, Root should only is allowed to connect from ' localhost '  Login for No):

Do you want to close root remote login? Select Y.

(4)

' Test '   for Testing,and should is removed before moving into a productionenvironment. Remove test database and access to it for for No):

Do you want to remove the test repository? Select Y.

(5)

Reloading the privilege tables would ensure that all changesmade so far would take effect immediately. Reload privilege Tables now for No):

Do you want to re-read permissions directly? Select Y.

4. Try to enter the SQL instruction mode again:

Mysql-uroot-p

Success!

By this step we have completed the installation of MySQL.

Install MySQL experience under 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.