MySQL 5.7.35 开通远程账号

Keva
阅读 1,080

创建用户:

create user 'username'@'localhost' identified by 'password';
create user 'username'@'%' identified by 'password';

 

修改密码:

update user set authentication_string=password('password') where user='username'; 
flush privileges;

 

开通权限:

grant all privileges on *.* to 'username'@'%' identified by 'password' with grant option;

 

刷新权限:

flush privileges;
回到顶部