Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Solution to the problem of mysql ERROR 1045 (28000)

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I have encountered mysql ERROR 1045 for a long time, and I have written it down myself. 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. Find the configuration file my.ini and open it. You can choose to open it with Notepad.

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

PS: If prompted not to save, you can cut the file to the desktop, change the save and then copy to mySQL directory

3. Start button +R opens the Run dialog box, enter "services.msc" to open the service window.

4. Restart MySQL service

5. Then run cmd, enter mysql -u root -p to log in without password, and enter directly when password: appears.

6. Enter mysql database:

mysql> use mysql;Database changed

mysql> update user set password=password("123456") where user="root";

Query OK, 1 rows affected (0.04 sec)Rows matched: 1 Changed: 1 Warnings: 0

8、. mysql> flush privileges;

Query OK, 0 rows affected (0.01 sec)

9, exit mysql: mysql> exit

Tip: Bye

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

10. After the change, modify the my.ini file again, delete the "skip-grant-tables" line we just added, save and exit, and restart the mysql service.

Excellent topic sharing:

mysql different versions installation tutorial

mysql5.7 installation tutorial

mysql5.6 installation tutorial

mysql8.0 installation tutorial

The above is all the content of this article, I hope to help everyone's study, but also hope that everyone a lot of support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report