- mysqladmin Command (headings)
The format is as follows (where user is the username and password is the new password):
mysqladmin-u user-p Password Password
After this command, you will be prompted to enter your original password, and you can modify it after entering it correctly.
For example, to set the root user's password to 123456, the
Mysqladmin-u root-p Password 123456
- UPDATE User statement (headings record)
This must be done first by logging in to MySQL with the root account and then executing:
UPDATE user SET Password=password (' 123456 ') WHERE user= ' root ';
FLUSH privileges;
- SET PASSWORD statement (headings record)
This approach also requires that you log in to MySQL with the root command and then execute:
SET PASSWORD for Root=password (' 123456 ');
- Root password is missing (headings 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 already installed, it will not appear, but first configure and install the service via Action>manage MySQL Instances. If the service is already installed, the right mouse button will appear after the "Configure Instance" menu. After clicking, the following MySQL administrator window appears:
If the original service configuration is normal, select "Startup variable" in the list on the left, and select "Security" in the appropriate right-hand tab, tick "Disable Grant table" and then "Apply Changes".
And go back to the "server control" on the left, and the corresponding "Start/Stop Services" tab on the right, click Start Service. At this point, the connection to MySQL has no user name and password, you can change the root password.
Modify MySQL user password