MySQL ERROR 1045 (28000) solution, 104528000

Source: Internet
Author: User

MySQL ERROR 1045 (28000) solution, 104528000

Error:

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

In windows, the solution to the preceding two errors is verified by myself. The solution is as follows:

1. Find the configuration file my. ini and open it. You can choose to open it in notepad.

2. Search for the mysqld keyword. After finding it, add skip-grant-tables under mysqld, save and exit. PS: if you do not want to save the file, you can cut it to the desktop, save it, and copy it to the mySQL directory.

3. Save and restart mySQL.

4. Run cmd and enter mysql-u root-p to log on without a password. If password: is displayed, press enter to enter.

5. Enter the mysql database:
1). Switch the Database: mysql> use mysql; Database changed
2). set a new password for the root user: mysql> update user set password = password ("123456") where user = "root ";
3) refresh the database: mysql> flush privileges;
4). Exit mysql: mysql> quitBye
PS: 123456 is the new password. You can change it to your own password as needed.

6. After modification, modify the my. ini file, delete the "skip-grant-tables" line we just added, save and quit, and restart mysql.

The above is all the content in this article. I hope it will help you solve the MySQL ERROR 1045 (28000) problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.