Record a process of windows mysql5.7 installation failure

First download the mysql installation package windows version 

https://dev.mysql.com/downloads/installer/

Then when executing the last step of installing the mysql msi installation package, it will display

Failed to start service MySQL57. Only when the task is in the completion state (RanToCompletion, Fau

  • At this time, check whether the uninstallation residue of mysql under windows has not been cleaned up.
  • Either it is windows, mysql service is not up. It shows that the service is not up, modify this place
  •  After changing here, manually right-click the red MYSQL5.7 in the picture, start it, and remember to stop after checking it;
  • Mysql is installed to the last step, where the start server fails. Just continue with the installation

After successful installation, navicat cannot connect, ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor

  1. Then go to the mysql installation directory: C:\Program Files\MySQL\MySQL Server 5.7\bin
  2. Open cmd and execute the command:
  3. mysqld --skip-grant-tables
  4. Do not close the previous window to ensure that MySQL can log in without a password.

  5. Open a new administrator command line, switch to the MySQL bin file,

  6. Enter mysql -uroot -p and press Enter, without entering a password, just press Enter to skip,

  7. Enter use mysql to enter the database successfully,

  8. UPDATE mysql.user SET authentication_string=PASSWORD(“123456”) WHERE User=“root”;
  9. Change the password to 123456
  10. Refresh the permissions table with the following command:
  11. FLUSH PRIVILEGES;

Finally, restart the mysql service instance, right-click on the red picture MYSQL above to restart

Guess you like

Origin blog.csdn.net/haoweng4800/article/details/130788389