前往小程序,Get更优阅读体验!
立即前往
发布
社区首页 >专栏 >ERROR 1449 (HY000): The user specified as a definer does not exist

ERROR 1449 (HY000): The user specified as a definer does not exist

原创
作者头像
风起--追风
发布2022-11-04 18:02:34
发布2022-11-04 18:02:34
1.9K0
举报
文章被收录于专栏:sql与spec性能sql与spec性能
  1. ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist

报错如下:

原因: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 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档