1. ProblemSometimes when we log in to Mysql and enter the password, this situation occurs mysql -u root -p Enter Password > 'Password' Error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Or: Error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 2. SolutionModify the my.in/my.cnf configuration file Enter the mysql installation directory Edit my.ini Add skip-grant-tables under [mysqld] and save the file. Open a command line as an administrator ①Restart mysql: 1. net stop mysql 2. net start mysql ②Enter mysql, log in mysql -u root -p ③Enter use mysql to change the root password: ④Exit: quit; ⑤Restart mysql again: 1. net stop mysql 2. net start mysql ⑥Whether the test is successful means whether the login is successful. Enter Password>'New Password' There will be no mistakes, you can log in! ! ! (Another situation is that you entered the wrong password. If this is the first time you log in after initialization, it is very likely that the password is wrong. You should carefully check the password after initialization. It may be due to spaces, decimal points and other symbols.) The above is the detailed content of solving mysql: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES). For more information about ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO/YES), please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: Tips on making web pages for mobile phones
>>: CSS stacking and z-index example code
Preface In the development of actual projects, we...
It is very easy to delete a table in MySQL, but y...
The <input> tag The <input> tag is us...
Background color and transparency settings As sho...
HTML <div class="spinner"></di...
1 QPS calculation (number of queries per second) ...
Firewall A firewall is a set of rules. When a pac...
Note 1: The entire background in the above pictur...
1. Naming conventions 1. Database names, table na...
First time using docker to package and deploy ima...
Preface MySQL slow query log is a function that w...
Meta tag function The META tag is a key tag in th...
A simple example of how to use the three methods ...
The insignificant flex-basis has caused a lot of ...
Node.js solves the problem of Chinese garbled cha...