MySQL更改/修改root密码的三种方法

第一种:
mysql>UPDATE user SET Password=PASSWORD(‘new_password’) WHERE user=’root’;
mysql>FLUSH PRIVILEGES;

第二种:
mysql>SET PASSWORD FOR root=PASSWORD(‘new_password’);

第三种:
shell>mysqladmin -u root password new_password;

Leave a Reply

Your email address will not be published. Required fields are marked *