Issue 1: Just installed MySQL, set the user name password root, login OK, and then even how can not even on the
Operation Steps:
Input: Mysql-uroot-proot
Tip: ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:yes)
Troubleshooting 1:
- Direct input to MySQL, connection successful
- show databases; Only INFORMATION_SCHEMA & Test two sheets
- Check it out, it's not enough authority.
Troubleshooting 2:
- Stop Mysql:service mysqld Stop first
- Safe Mode start Mysqld_safe--skip-grant-tables &
- Log in mysql:mysql root with root MySQL
- Use MySQL;
- Select Host,user,password from User;
- Find localhost This host does not have user name and password configured, no wonder =
Repair:
- Update user set password= ' root ', user= ' root ' where host= ' localhost ';
- Select Host,user,password from user, to confirm that localhost already has the corresponding user name and password
- Kill Mysqld_safe, launch Mysqld:service mysqld start
- Login Mysql:mysql-uroot-proot with username and password
- Bingo, it's a success.
MySQL username password login not on