An error occurred while logging on to mysql: ERROR1045: Accessdeniedforuser. Why? Next, I will introduce you in detail. If you are interested, you can refer to it. It may help you.
When logging on to mysql, an ERROR occurs: ERROR 1045: Access denied for user. Why? Next, I will introduce you in detail. If you are interested, you can refer to it. It may help you.
In Windows, the following ERROR occurs during mysql Logon: ERROR 1045: Access denied for user: 'root @ localhost' (Using password: YES)
I found some solutions from the Internet and finally got a solution. Now I want to record the specific solution:
The Code is as follows:
C: \> SC stop mysql
C: \> mysqld -- defaults-file = "C: \ MySQL \ MySQLServer6.0 \ my. ini" -- console -- skip-grant-tables
Re-open a cmd
The Code is as follows:
C: \> mysql-uroot-p
Enter password: <-enter
Mysql> UPDATE user SET Password = PASSWORD ('newpassword') where USER = 'root ';
Mysql> flush privileges;
Mysql> quit