MySQL:ERROR 1045(28000):Access denied for user 'root'@'localhost'(using password:YES(NO))

wrong reason

1045 Meaning: The user name or password is incorrect

Solution

reset Password

1, no reset cryptographic methods my.ini

  1. MySQL data files in the deleted directory folder, re-initialize and generate a temporary password, the command line
 mysqld --initialize --console;

Note that generates a tempotary password

  1. Restart the mysql service
    A. net start mysql
    B. Computer Management - Services and Applications - Services - MySQL - click on the "Start"

  2. Command line login MySQL, mysql -u using the temporary password root-p tempotarypassword
    enter a user name and a temporary password

  3. Before the formal implementation of sql statement, you need to modify out temporary password generated

ALTER user 'root'@'localhost' IDENTIFIED BY 'new password';
  1. The new password log on again

Second, the method of directly modifying my.ini [ Reference Site ]

Three, my.ini file [ Reference Site ]

Expansion problem

MySQL8.0 version - Navicat issue '2059'

Released eight original articles · won praise 3 · Views 648

Guess you like

Origin blog.csdn.net/lehek/article/details/104179792