Solutions to MySQL error 1045 (28000) problem

Time:2020-10-26

Encountered MySQL error 1045 this problem for a long time, write down. The method is Baidu, pro test effective.

ERROR 1045 (28000): Access denied for user ‘ODBC’@’localhost’ (using password: NO)

Error 1045 (28000): access denied for user ‘ODBC’ @’localhost ‘(using password: Yes)

Windows, the above two error solutions

1. Configuration file found my.ini , and then open it, optionally in Notepad

2. After opening, search for mysqld keyword, add skip grant tables under mysqld, save and exit.

PS: if prompted not to save, you can cut the file to the desktop, and then copy the changes to the MySQL directory

3. Start button + R, open the run dialog box, enter“ services.msc ”, open the service window

4. Restart MySQL service

5. Then run CMD and enter MySQL – U root – P to log in without password. When password appears, press enter directly to enter.

6. Enter MySQL database:


mysql> use mysql;Database changed

7. Set a new password for the root user: MySQL > update user set password = password (“123456”) where user = root;

Prompt: query OK, 1 rows affected (0.04 sec) rows matched: 1 changed: 1 warnings: 0

8. Refresh the database mysql > flush privileges;

Prompt: query OK, 0 rows affected (0.01 sec)

9. Exit MySQL: MySQL > Exit

Tip: by

PS: 123456 is a new password. Users can change it into their own password according to their own needs

10. After that, I’ll revise it again my.ini In this file, delete the line “skip grant tables” that we just added, save and exit, and then restart the MySQL service.

Wonderful topic sharing:

Different versions of MySQL installation tutorial

Mysql5.7 installation tutorial

Mysql5.6 installation tutorial

Mysql8.0 installation tutorial

The above is the whole content of this article, I hope to help you in your study, and I hope you can support developeppaer more.

Recommended Today

HTTP request details anti theft chain technology

give an example: GET /test/hello.html HTTP/1.1 [indicates the sent get request, and the request resource is / test / Hello. HTML] Accept: * / * [indicates that the client can accept any data] Referer: http://localhost : 80 / test / abc.html Accept language: zh cn User agent: Mozilla / 4.0 Accept encoding: gzip, deflate Host: […]