Remember once MySQL5.6 1067 error to start the service troubleshooting solutions

Question: MySQL56 service start time, reported 1067 errors.

This error is relatively common, and online solutions are also varied, paper record of this whole process to solve the problem.

1, in a manner that allows the administrator CMD, into the Bin directory under the MySQL installation path.

2, delete MySQL56 service.

sc delete MySQL56

3, try to use the command: mysqld --install MySQL56 installation MySQL56 service, but failed.

4, a search on the machine, install the package actually found the cache in the installation directory, in the C: \ ProgramData \ under MySQL \ MySQL Installer \ Product Cache directory.

5, try to use mysql-5.6.12-winx64.msi repair the installation, it is successfully completed.

6, again step 3 above, install the MySQL service.

mysqld --install MySQL56

7, start MySQL56 service in the Services Manager, successfully.

8, test log in, the big question is, root user password previously do not go, this is the rhythm you want to reset the root password. In the case of forget the root password, you can enter safe mode mysql, and reset the root password.

9, stop the MySQL service.

net stop mysql56

10, switching to the bin directory, using the following command to skip the start permission checks mysql.

mysqld --skip-grant-tables

In this step, if the configuration file my.ini, and it needs to be introduced, then use the following command. Specifies the path to store the data in the my.ini file, and if does not introduce the configuration file, No such file or directory error will be prompted.

mysqld --defaults-file="C:/ProgramData/MySQL/MySQL Server 5.6/my.ini" --skip-grant-tables

11, mysql connection, another command prompt window open (not closed on the security mode window step), the same change to the bin directory is mysql, mysql skip input connection permission verification database.

mysql

12, reset passwords, run the following command to reset the root password (5.6 and previous versions of password field, and thereafter for 5.7 authentication_string field).

update mysql.user set password="123456" where user="root"

13, the next query validation.

select user,password from mysql.user;

14, execution flush privileges; refresh command permission table, reset the password has been completed.

flush privileges;

15, enter quit to exit.

quit

 

https://www.cnblogs.com/Wcy100/p/5293578.html

https://www.jb51.net/article/129937.htm

 

Guess you like

Origin www.cnblogs.com/hans_gis/p/12369744.html