MySQL Error 1045 (28000) wrong solution _mysql

Source: Internet
Author: User
Tags odbc

Error behavior:

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 wrong solutions, I am pro-test effective, now share the solution is as follows:

1. Locate the configuration file My.ini and open it, optionally with Notepad.

2. After opening, search the MYSQLD keyword. After you find it, add the skip-grant-tables below the mysqld and save the exit. PS: If prompted not to save, you can cut the file to the desktop, change the save and then copy to the MySQL directory.

3. Restart MySQL after saving.

4. Run cmd, input mysql-u root-p can be without password login, appear password: When direct return can enter.

5. Access to MySQL database:
1). Switch database:mysql> use mysql;database changed
2. Set the new password for 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 for the new password, users can modify their own password according to their needs.

6. After the correction, and then modify the My.ini this file, we just joined the "Skip-grant-tables" this line to delete, save exit and restart the MySQL service on it.

The above is the entire content of this article, I hope to solve the MySQL error 1045 (28000) error problem is helpful.

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.