1.进入数据库c:\User\...>mysql -uroot -p
2.输入密码:
3.
method1: mysql>alter user root@localhost identified by 'new password' method2: mysql> use mysql mysql> update user set authentication_string=password(‘new password') where user='root' and host='localhost'; mysql> flush privaileges; method3: set password for root@localhost=password('new password');
method4:不用进数据库
c:\users\...>mysqladmihn -uroot -p旧密码 password 新密码