The solution for forgetting the mysqlroot password is bitsCN. in comwindows, 1. stop the MYSQL service. In CMD, open the DOS window, enter net stop mysql2, and in the CMD command line window, enter the MySQL installation directory, such as d:/MySQL/bin3, skip the mysql permission checklist, that is, when mysql is up, it can enter the database without entering a password. Command: mysqld-nt -- skip-grant-tables4, re-open a CMD command line window, enter mysql-uroot-p, use the empty password to log on to MySQL (do not enter the password, press enter) 5. enter the following command to modify the password of the root user mysql> update mysql. user set password = PASSWORD ('newpass') where user = 'root'; 6. refresh the permission table mysql> flush privileges; 7. exit mysql> quit.
1. shell> whereis mysqld_safe in linux
2. shell> path/to/mysqld_safe -- skip-grant-tables
3. open the new terminal shell> mysql-uroot-p, empty password to log on to MySQL
4. mysql> update mysql. user set password = PASSWORD ('newpass') where user = 'root'
5. mysql> flush privileges;/q
6. mysqladmin-uroot-p 'newpass' shutdown to disable MySQL service bitsCN.com
The above is the solution to forget the mysql root password _ MySQL content. For more information, please follow the PHP Chinese network (www.php1.cn )!