mysql命令下执行下面语句:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON mealbooker.* TO 'root'@'%' identified by 'root';
flush privileges;
mysql 创建用户并授权:
-- mysql创建一个外网用户
create user 'root'@'%' identified by 'root';
-- 授予外网用户可以连接数据库的所有权限
grant all privileges on `mysql`.* to 'root'@'%' identified by 'root'; //1
-- 刷新
flush privileges;
注://1 数据库名.*,identified by 'xxx' 表示密码
mysql "select command denied to user root" 问题解决
最新推荐文章于 2024-04-01 13:32:17 发布