MySQL更改用户密码
比如更改root用户密码:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypass');
FLUSH PRIVILEGES;
以上会更改localhost
链接的root用户密码,想要更改所有域的链接的root用户密码,使用:
SET PASSWORD FOR 'root'@'%' = PASSWORD('mypass');
FLUSH PRIVILEGES;
比如更改root用户密码:
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('mypass');
FLUSH PRIVILEGES;
以上会更改localhost
链接的root用户密码,想要更改所有域的链接的root用户密码,使用:
SET PASSWORD FOR 'root'@'%' = PASSWORD('mypass');
FLUSH PRIVILEGES;
评论已关闭