一、授权
1)操作一:授权
允许远程登录: GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
5.7引用授权: grant select,create,drop,update,alter on *.* to '${username}'@'%' identified by '${password}' with grant option;
eg: grant select,REFERENCES,create,drop,update,alter on *.* to 'root'@'%' identified by '123456' with grant option;
ps: 解决MySQL5.7 授权问题
1.1)授权所有权
1)命令
grant all privileges on {databasesName}.* to {userName};
说明1: 需要root解决
2)操作二:立即更新
flush privileges;
3)辅助操作:查看权限
show grants for '${username}'@'%';