报错如下:
原因:mysql数据库在初始化时会创建四个保留帐号,在mysql.user中查询如下
在这边需要重新创建缺失的用户,并赋予正确的权限;
2.
创建三个用户
create user 'mysql.sys'@localhost identified by '666666';
create user 'mysql.infoschema'@localhost identified by '666666';
create user 'mysql.session'@localhost identified by '666666';
flush privileges;
授权,不太了解该用户的正确权限,故全给;
grant all privileges on *.* to 'mysql.infoschema'@localhost
grant all privileges on *.* to 'mysql.session'@localhost;
grant all privileges on *.* to 'mysql.sys'@localhost;
flush privileges;
验证
use sakila;
show tables;
#恢复正常
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。