mysql command-line change passwords

1. Open a cmd window as an administrator
2. Go to install mysql bin directory
3. command net start mysql start the service
4.mysql -u root -p administrator login
5. Enter the old password into the database
6. Enter ALTER USER 'root' @ 'localhost' IDENTIFIED BY ' new password';

Guess you like

Origin www.cnblogs.com/ssyh/p/11496969.html