A. Enter the following address in the browser
https://dev.mysql.com/downloads/mysql/
Two. Go to the following interface: Directly click on the location below, select Skip Login
Click to download directly after this.
Three. Once the download is complete, double-click to open, pop up the following screen, then continue to click
Continue below, Hare install other software.
Four. Start MySQL
After the installation is complete, check the following options in the settings, if there is a MySQL instructions installed successfully
After clicking, start MySQL
Five. Modify the database password
When the boot is complete, open the terminal
alias
mysql=
/usr/local/mysql/bin/mysql
alias
mysqladmin=
/usr/local/mysql/bin/mysqladmin
Copy the above two instructions to the terminal to run, give two addresses to a temporary alias purpose is the next execution can be directly executed MySQL or mysqladmin do not need to go back and forth to switch directories
Next, modify the database password and execute the following command
Mysqladmin-u root-p Password root123
Root123 is my new password, self-modification to the password I want to set to enter the password after the prompt, so that the input password is not your computer password but the database password before 5.7 is the default user name and password, are root but from 5.7, only the default user name P:ro OT the default password will be assigned to you automatically, when the installation will give you automatic distribution we can also from the MAC notification bar to see the automatic generation of a database password
The default password is localhost: After all the content, enter it after the return.
(Mac in the command business to enter the password is not visible, so when entering the password, be careful not to enter the error)
Six. Enter the database
See above information, modify success
And then into the database.
Ensure that you have performed: alias
mysql=
/usr/local/mysql/bin/mysql
If it is not executed, you can switch to the above directory to execute the MySQL command.
Otherwise prompt to find not MySQL
Next, execute the following command: Mysql-u root-p
Note-P does not write anything, then enter
Will let you enter the password, at this time the password is you change the password above
What I'm typing here: root123
See the following information, all the instructions have entered the database
MySQL download MySQL5.7 and detailed installation process under Mac system