1. After the installation is successful, there is a default password Z/rmNuTE5/Wt
2. You need to reset the password after the first installation
3. Execute mysql -u root -p and enter the original password to log in
4. Enter the password according to the following steps
step 1: SET PASSWORD = PASSWORD(‘your new password‘);
step 2: ALTER USER ‘root‘@‘localhost‘ PASSWORD EXPIRE NEVER;
step 3: flush privileges;
Complete the above three steps to log out and log in again, just use the newly set password. Except for the red one that is changed to a new password, you can enter the rest as it is.
5. If you can't connect to mysql and report a mysql.lock error, then start the mysql server first
$ sudo /usr/local/mysql/support-files/mysql.server start
6, stop mysql service command
$ sudo /usr/local/mysql/support-files/mysql.server stop