Directory
Mysqladmin command
UPDATE User Statement
SET PASSWORD Statement
Root password loss (pending verification)
mysqladmin Command
(Huitian record)
The format is as follows (where user is username and password is a new password):
mysqladmin-u user-p Password Password
The command prompts you to enter the original password and you can modify it after you have entered it correctly.
For example, if you set the root password to 123456, the
Copy Code code as follows:
Mysqladmin-u root-p Password 123456
UPDATE User Statement
(Huitian record)
This must be done by logging into MySQL with the root account and then executing:
Copy Code code as follows:
UPDATE user SET Password=password (' 123456 ') WHERE user= ' root ';
FLUSH privileges;
SET PASSWORD Statement
(Huitian record)
This approach also requires logging into MySQL with the root command, and then executing:
Copy Code code as follows:
SET PASSWORD for Root=password (' 123456 ');
root password loss condition
(Huitian record)
Using MySQL's own tool "MySQL GUI tools", I have been using the 5.0 version. Run a program MySQLSystemTrayMonitor.exe in the installation directory, and the icon will appear in the system tray when you are finished running. If the MySQL service is not installed, it will not appear, and you can first configure and install the service via Action>manage MySQL instances. If you have already installed the service, the "Configure Instance" menu appears when you click the right mouse button. After clicking, the following MySQL administrator window appears:
If the original service configuration is normal, select "Start variable" in the list on the left and select "Security" in the corresponding Right tab, check "Disable Grant table" and then & ldquo; Apply changes.
And back to the left of the "server Control", and the corresponding "Start/Stop Service" tab on the right, click Start Service. At this point, the connection to MySQL has no user name and password, you can modify the root password.