The previous article basically summed up the next myql under the instructions how to create a user, see: "Mysql" common instructions--user action (create, authorize, modify, delete)
Today, the special situation, forget the password what to do???
This can be done by reloading, deleting the configuration, and so on. What if it doesn't reload?
Principle:
By increasing the startup parameters:--skip-grant-tables skips grant-tables to start the database, so you can go in without a password.
below to play:
Under Linux:
1, shut down the MySQL process, should be Kazakhstan for example: service mysql stop or Ps-ef | grep MySQL Kill (Mysqlpid) also has rcmysqld stop and so on.
2, increase the startup parameters: You can edit/etc/my.ini or/etc/my.cnf file, increase the startup parameters --skip-grant-tables can also use the command:/usr/bin/mysqld_safe-- Skip-grant-tables & to start MySQL
3, no password to enter the system Change Password: Mysql-u root-p can be.
The same is true under window, but the operation is not the same.
1, My Computer right button "management" service "find MySQL and stop or win+r run cmd and then run the net stop MySQL
2, use the --skip-grant-tables parameter to start the database.
C:\users\wj>net Stop Mysqlmysql service is stopping: The MySQL service has stopped successfully. C:\users\wj>mysqld--skip-grant-tables
3. Log in with Root, and go for whatever it is.
4. Stop starting with this parameter.