After the system is reinstalled today, after MySQL is installed and started with sqlyogent, the system prompts "Access denied for user 'root' @ 'localhost' (using password: Yes )", I started to find out the root permission problem because of a password problem. I thought it may be because I did not use the Administrator identity to install Windows 7, therefore, the root role does not have the permission. I found a solution from the Internet and recorded it here:
1. log on to the system as an administrator, stop the MySQL service, or end the mysqld-nt process;
2. Enter the command line and go to the MySQL installation directory. Assume that the installation directory is D: \ mysql \, and CMD enter the command line;
3. run D: \ Program Files \ mysql server 5.5 \ bin \ mysqld-NT -- skip-grant-tables to start MySQL and disable permission check; (I changed mysqld-nt to mysqld)
4. run D: \ Program Files \ mysql server 5.5 \ bin \ mysqladmin-u root flush-Privileges password "newpassword" to reset the root password. (I run another cmd)
5. Restart the MySQL service;