Environment
RedHat Linux 9 + vwware 8.0 + SSH 3.2.9 + Putty 0.62 + MySQL 3.2
Problem
MySQL Change Root password
Solve
mysqladmin-u user-p Password
password
User is username, password is new password
The command prompts you to enter the original password and you can modify it after you have entered it correctly.
For example, the password for the root user is set to 123456, then mysqladmin-u root-p password 123456
After entering this command, you need to enter the original password for root, and then the root password will be changed to password.
Change the command root to your username, and you can change your password.
Of course, if your mysqladmin connection is not mysqlserver, or you do not have the means to perform mysqladmin, then this method is ineffective, and mysqladmin cannot clear the password.
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/MySQL/