A Command Line to modify mysql password

First log in MySQL .

Installation path database reaches bin directory: D: \ Software \ MySQL \ bin> MySQL -u the root -p
MySQL> use MySQL; 

At this time you will be required to enter a password that is original password
mysql> update user set password = password ( ' new password') WHERE User = 'the root' and Host = 'localhost'; 
MySQL> the flush privileges; 

Guess you like

Origin www.cnblogs.com/llboko/p/12323823.html