Installation mysql8.0.16 initial setup problems encountered when password

Follow the online tutorial, proceed to install mysql mysql - u root -p command when an error

MySQL :: ERROR 1045 (28000): Unknown error 1045

This time go online to check solutions to the problems, first enter cmd net stop mysql, mysql stop service, and then in the mysql installation path, find my.ini file open (If you do not create your own, go online to find a copy content into it, change under path remember), open my.ini, add the following sentence at the mysqld skip-grant-tables to skip the password, and then open cmd, start mysql service, net start mysql, then mysql -uroot -p, this time will make you enter the password, hit enter on the line, it will ignore the password to log mysql, back to the ini file deletion skip that sentence, restart the service, it will be solved.

But it found me such a change does not work (some alternative, probably because before installed more than once mysql without success leads), so continue to find ways, and finally found a method, data files in the path of the folder, delete the two files, ib_logfile0 , ib_logfile1, repeat the above operation, a success. The reason I do not know why, looks like this is called a transaction log, the first record, after verification it.

 

If there is such a problem I encountered a small partner, the general solution ① can be resolved, adding my, ini in skip-grant-tables still does not work, try ② method.

Guess you like

Origin www.cnblogs.com/lovey59/p/11762509.html