First enter the terminal
1. Enter the following command to display the MySQL process number
Ps-a |grep-i MySQL
2. Enter the following command to kill the process shown above
Kill-9 Process number 1 process number 2
3. Enter the following command to enter MySQL security mode
Mysqld_safe--skip-grant-tables &
4, enter the following command to modify the password, note that the end of the semicolon must have, each input line to enter
Use MySQL;
Update user Set Password = password (' Your password ') where user = ' root ';
Exit
5. Enter the following command to start MySQL
Service MySQL Start
6. Successful modification
Turn on remote users
First, follow the above steps to enter Safe mode under Terminal
1. Enter the following command
Mysql-u Root
2. Re-enter
Use mysql; enter
GRANT All privileges on * * to ' test ' @ ' 192.168.0.109 ' identified by ' Testpassword '; Enter
flush Privileges; Enter
exit; Enter
This is the successful addition of the user test, the password is Testpassword, he can use the IP address of 192.168.0.109 host on the connection database
Modify the root user password of the MySQL database and open the remote user under the Linux system