Directory
Mysqladmin command
UPDATE user statement
Set password statement
Root Password loss (to be verified)
Mysqladmin command
(Back to directory)
The format is as follows (USER is the USER name and PASSWORD is the new PASSWORD ):
Mysqladmin-u USER-p password PASSWORD
After the command is run, the system prompts you to enter the original password. after entering the correct password, you can modify the password.
For example, if you set the root user password to 123456
Copy codeCode: mysqladmin-u root-p password 123456
UPDATE user statement(Back to directory)
In this way, you must first log on to mysql with the root account and then execute:Copy codeThe Code is as follows: UPDATE user SET password = PASSWORD ('000000') WHERE user = 'root ';
Flush privileges;
Set password statement(Back to directory)
In this way, you also need to log on to mysql with the root command and then execute:Copy codeThe Code is as follows: Set password for root = PASSWORD ('123 ');
Root Password loss(Back to directory)
I have been using MySQL 5.0 with a built-in tool "MySQL GUI Tools. Run the program MySQLSystemTrayMonitor.exe in the installation directory. After running the program, an icon is displayed on the system tray. If the MySQL service has not been installed, it will not appear. You can first configure and install the service through Action> Manage MySQL Instances. If you have installed the service, right-click it and the "Configure Instance" menu will appear. The following MySQL Administrator window appears:
If the original service configuration is normal, select "Start variable" in the list on the left, select "security" in the corresponding label on the right, and select "Disable grant table ", then & ldquo; application change ".
Return to "Server Control" on the left, and click "start/stop service" on the right. At this time, the user name and password are no longer required to connect to mysql. You can change the root password.