比如更改root用户密码:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypass');
FLUSH PRIVILEGES;

以上会更改localhost链接的root用户密码,想要更改所有域的链接的root用户密码,使用:

SET PASSWORD FOR 'root'@'%' = PASSWORD('mypass');
FLUSH PRIVILEGES;

标签: none

评论已关闭