Enter the address in the browser:dev.mysql.com/downloads/mysql/, as shown in:
Go to the following interface, directly click on the location below, select Skip Login, click after this direct download, as shown in:
After the download is complete, double-click to open, pop up the following screen, then continue to click, as shown in: 2
Q
Continue until the installation is complete.
Start MySQL, after installation, go to the settings to see the following options, if there is a MySQL description has been installed successfully, as shown in:
After clicking, start MySQL as shown in:
To modify a 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
The goal is that the next execution can execute MySQL or mysqladmin directly
There is no need to switch directories back and forth, as shown in:
Next, modify the database password and execute the following command
Mysqladmin-u root-p Password root123
Root123 is my new password, I change it to the password I want to set
Press ENTER, prompt for password, at this time let enter the password is not your computer's password, but the database password.
There are default usernames and passwords before 5.7, both are root
However, after 5.7, only the default user name P:root
The default password is automatically assigned to you, which is automatically assigned to you when you install it.
We can also check in from the MAC notification bar, which is to automatically generate a database password, as shown in:
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), as shown in:
Enter the database, see the information above, modify the success
And then into the database.
Be sure to do it: 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, as shown in: