第一种:
shell>mysqladmin -u root password new_password;
第二种:
mysql>SET PASSWORD FOR root=PASSWORD(‘new_password’);
第三种:
mysql>UPDATE user SET Password=PASSWORD(‘new_password’) WHERE user=’root’;
mysql>FLUSH PRIVILEGES;
第一种:
shell>mysqladmin -u root password new_password;
第二种:
mysql>SET PASSWORD FOR root=PASSWORD(‘new_password’);
第三种:
mysql>UPDATE user SET Password=PASSWORD(‘new_password’) WHERE user=’root’;
mysql>FLUSH PRIVILEGES;