MySql8有新的安全要求,不能像之前的版本那样一次性创建用户并授权需要先创建用户,再进行授权操作
首先创建新用户:
create user 'username'@'host' identified by 'password';
再进行授权:
grant all privileges on *.* to 'username'@'%' with grant option;
授权之后刷新权限:
flush privileges;
首先创建新用户:
create user 'username'@'host' identified by 'password';
再进行授权:
grant all privileges on *.* to 'username'@'%' with grant option;
授权之后刷新权限:
flush privileges;