[Reprint] Install and use MySQL on Mac

Source: Internet
Author: User

Related version information

mysql Ver 14.14 Distrib 5.7.15, for osx10.11 (x86_64) using EditLine wrapper

Installation

There are many ways to install, each of which may encounter different problems. On the Mac with homebrew the installation of software is very convenient, but because mysql of the password and other issues, it is still not very convenient (if there is a better use homebrew of the installation and use of methods, please advise.

It dmg is used in the way of installation. Download MySQL Community Server

Once the download is complete, double-click to open it all the way, but when a pop-up box pops up, make sure to MYSQL Installer open the memo copy and paste the password in the popup box 2016-10-16T02:52:44.474550Z 1 [Note] A temporary password is generated for [email protected]: /kL_M_zXd3rA . Or just copy the password section. /kL_M_zXd3rA Why don't you write it down? Because the password is a bit complicated and difficult to fight.
, the figure from a reference to an article, I pretend to forget, the image of the invasion deleted.


MySQL installer prompt box change password open MySQL service
Click the button


The red part of the screen turns green when you open it running .

Configuration path

Open with a text editor .bash_profile , add PATH=$PATH:/usr/local/mysql/bin and save. I'm used to using Atom as a text editor, or directly with my own VIM editor. The command line input source ~/.bash_profile path is configured.

The above scenario is based on the bash configuration method

Login and Change Password login

mysql -u root -pLogin, enter the previously saved password


The cursor does not move when you enter a password


The above process is as follows


Configure the path to the effect after login change password

Use the SET PASSWORD FOR ‘root‘@‘localhost‘ = PASSWORD(‘newpass‘); change password. If your version is newer (for example, I installed the 5.7.15 version), the following prompt will appear, this time the password has been updated, but there will be warning. If you want to see warning, you can use show warning .



Laurent does not show Fourier
Links: Http://www.jianshu.com/p/2d902dd4fff4
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.

[Reprint] Install and use MySQL on 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.