WINDOWS MYSQL5.7 password expires or reset passwords

Windows MySQL password expiration or password reset steps:

Stop MySQL service (run services.msc, find mysql, stop it) Modify my. Ini file, add a new line at the end of the file: skip-grant-tablescmd goes into the install bin directory, my installation is on the C drive. (If you don’t remember where you installed it, you can find the MySQL service by running services.msc and double-click to view the directory): C:> CD “Program FilesMySQLMySQLMySQL Server 5.7bin” input command: mysql-u root-p, Enter password direct return, MySQL is the operation success

input: use mysql;, Output “Database changed” is successful (be careful not to drop the semicolon) Update password is 123456, enter command: update mysql. User set authentication_ String=password (‘123456′) where user=’root’; (Don’t drop the semicolon. The first command I entered was update user set password=password (“123456″) where user=”root”; Error: ERROR 1054 (42S22): Unknown column’password’in’field List’

Execute the following command: flush privileges; (Note that the semicolon cannot be removed) Exit, enter the command: quit; Run services. Msc, just start the MySQL service.

Related Posts