Complete steps for installing mysql5.7.19 under Mac,
1. Download the website:
Https://dev.mysql.com/downloads/mysql
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/08/65/wKiom1ngl_nB6a26AA-2GM5PXS4168.jpg "title=" Mysql02.jpg "style=" width:600px;height:330px; "alt=" wkiom1ngl_nb6a26aa-2gm5pxs4168.jpg "width=" "vspace=" 0 " Hspace= "0" height= "border=" 0 "/>
2. Install MySQL
After the download is complete, click Install, confirm all the way, and wait for the installation to succeed.
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/A7/1B/wKioL1nglIPACt7EAAoxYclac2Q082.jpg "title=" Mysql5.7.19.jpg "style=" WIDTH:600PX;HEIGHT:426PX; "alt=" wkiol1nglipact7eaaoxyclac2q082.jpg "width=" "vspace=" 0 " Hspace= "0" height= "426" border= "0"/>
Command line Run
Find ITerm open in the application and run the following two commands first:
alias
mysql=
/usr/local/mysql/bin/mysql
alias
mysqladmin=
/usr/local/mysql/bin/mysqladmin
These two commands are for the convenience of opening iTerm directly to run the MySQL command, rather than having to go to the MySQL installation directory to run. Next, all you have to do is reset the password
Reset Password Command:
mysqladmin -u root -p password newpass
Newpass is your new password.
After you run the Reset Password command, you are prompted to enter the old password. Students who have installed mysql5.6 or previous versions know that MySQL first run will assign a default password to the root user: root, the old password is root. But now if you enter root, the system prompts the password is wrong, what is the matter?
The original 5.7 version will not give the root user to assign a default password, but will give a temporary password, if you are careful, install MySQL will pop up a temporary password to allow you to save. If you haven't saved it, it doesn't matter, there will be in the notification bar on the right,
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/A7/1B/wKioL1ngldizR89YAAIgq6qLQwg016.jpg "title=" Mysql03.jpg "style=" width:500px;height:318px; "alt=" wkiol1ngldizr89yaaigq6qlqwg016.jpg "width=" "vspace=" 0 " Hspace= "0" height= "318" border= "0"/>
That is, the password is:98e4) yoek%w2
Enter the temporary password, the password changes successfully, and then sign in with the new password:
mysql -u root -p
Enter, new password, enter, login successful!
Now you can write your SQL command!
3. View status
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/08/65/wKiom1ngmYCB7OXCAAlqH9JdLkM612.jpg "style=" width : 500px;height:515px; "title=" mysql04.jpg "alt=" wkiom1ngmycb7oxcaalqh9jdlkm612.jpg "width=" "vspace=" 0 "hspace=" 0 "height=" 515 "border=" 0 "/>
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/08/65/wKiom1ngmYOjfkxzAAYrOKPUhvk952.jpg "style=" width : 500px;height:273px; "title=" mysql05.jpg "alt=" wkiom1ngmyojfkxzaayrokpuhvk952.jpg "width=" "vspace=" 0 "hspace=" 0 "height=" 273 "border=" 0 "/>
Complete steps for installing mysql5.7.19 under MAC (graphic)