After installing mysql, mysql command input into DOS, an error: mysql ERROR 1045 (28000) solution

 

First, modify the my.ini file, and restart the mysql service

  Find the configuration file my.ini, then open it, you can choose to use Notepad to open

mysql ERROR 1045 (28000): error Solution

 

  After opening, mysqld keyword search, the find, add skip-grant-tables in the following mysqld, save and exit.
mysql ERROR 1045 (28000): error Solution
mysql ERROR 1045 (28000): error Solution

  After saving the restart mySQL: Open the Services window, find the service named mysql, shut down and restart

 

Second, modify mysql password

1. Go to the mysql database:

  mysql> use mysql;

2. Set a new password to the root user, the blue part of their input:

  mysql> update user set password=password("123") where user="root";

3. Refresh Database

  mysql> flush privileges;

4. Exit mysql

  mysql> quit;

 

Third, modify my.ini, and restart the mysql service

  After changing for the better, and then modify the my.ini file, delete We just added "skip-grant-tables" line, save and exit and then restart the mysql service on it.

Guess you like

Origin www.cnblogs.com/hzjdpawn/p/11617787.html