本文主要介绍了在MySQL中修改一个用户密码的三个方法,具体示例请参考下文:
#在控制台上输入bash$ mysql -u root mysql#用mysql客户程序mysql> UPDATE user SET password=PASSWORD('new password') WHERE user='Alice';mysql> FLUSH PRIVILEGES;mysql> QUIT
#在控制台上输入bash$ mysql -u root mysqlmysql> SET PASSWORD FOR hunte=PASSWORD('new password');mysql> QUIT
#直接在控制台上输入bash$ mysqladmin -u root 'old password' 'new password'
相关文章: