mysql ERROR 1045 (28000): Error solution
Windows operating system to change mysql password
When you log in to mysql in the dos window, the following prompt appears. Often, the password needs to be reset for various reasons. The following briefly introduces how to change the password under the win operating system.
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO); ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: YES)
- Find the configuration file my.ini, then open it, you can choose to open it with Notepad, add skip-grant-tables under mysqld, save and exit
Then restart the mysql service. Turn off the service first and then turn it on again. You can also manually restart the service in the service.
net stop MySQL net start MySQL
Finally log in to mysql to change the password. When password: appears, you can enter directly by pressing Enter. Modify the password according to personal preferences, the demo here is 123456, and finally refresh the database and it is ok.
mysql -uroot -p update user set password=password(“123456″) where user=”root”; flush privileges;
The last important step is to modify the my.ini file after the modification, delete the “skip-grant-tables” line we just added, save and exit, and then restart the mysql service.