1. Download the file
https://dev.mysql.com/downloads/mysql/5.6.html#downloads
2. Install
Continued Well, not repeat them here
3. Note that here, the first installation there is no prompt to change the password, so we need to change passwords
3.1. First stop service
3.2. Prohibition mysql authentication
Execute the following two commands
cd /usr/local/mysql/bin/
# 禁止mysql的密码输入验证功能
sudo ./mysqld_safe --skip-grant-tables
4. Re-open a client
4.1. Change Password
cd /usr/local/mysql/bin/
./mysql
mysql command
FLUSH PRIVILEGES;
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root');
As shown below