Problem description (the following discussion is limited to Windows environment): D:\develop\ide\mysql\mysql5.5\bin>mysql -u root -p Enter password: ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) Step 1: Edit the my.ini configuration file in the MySQL installation directory and add the following under the [mysqld] entry: As shown below: After saving and exiting Step 2: Restart MySQL The restart steps are as follows: 1. Enter the Task Manager and check whether mysqld.exe is running. If it is running, kill it; 2. Find the bin folder in the MySQL installation directory, then find the mysqld.exe file, double-click it to run, then enter the task manager again to check whether mysqld.exe is running. After confirming that it is running, double-click the mysql.exe file. Step 3: Reset the password of the local MySQL database In cmd, go to the D:\develop\ide\mysql\mysql5.5\bin directory and enter mysql -u root -p. You can log in without a password. When password: appears, press Enter to enter. ERROR 1045 (28000) will not appear, but many operations will be restricted because you do not have permission. So you need to follow the following process (the red part is the input part, and the orange part is the code displayed after execution): 1. Enter the mysql database: mysql> use mysql; Database changed 2. Set a new password for the root user. You need to enter the red bold part yourself: mysql> update user set password=password("new password") where user="root"; Query OK, 1 rows affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0 3. Refresh the database mysql> flush privileges; Query OK, 0 rows affected (0.00 sec) 4. Exit mysql: mysql> quit Bye Step 4: Restore the my.ini file After the change, modify the my.ini file again, delete the " Summarize The above is the editor's introduction to solving the mysql ERROR 1045 (28000)-- Access denied for user problem. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: Implementation of Docker data volume operations
>>: Writing methods that should be prohibited in native JS
MySQL 8.0.25 decompression version installation t...
Table of contents 1. MySQL data backup 1.1, mysql...
1. Create a Docker network docker network create ...
This article mainly introduces the method of CSS ...
Article mind map Why use master-slave replication...
Teaching Topics Web page Applicable grade Second ...
js realizes the special effect of clicking and dr...
Every time after installing the system, I have to...
The JSON format field is a new attribute added in...
1. Introduction I recently upgraded my blog and a...
This article example shares the specific code of ...
When making a form in a recent project, I need to...
Introduction Use simple jQuery+CSS to create a cus...
In MySQL database operations, we always hope to a...
This article summarizes common operating techniqu...