(mysql 登录报错1449-The user specified as a definer(‘mysql.infoschema’@localhost’) does not exist)
折腾了一宿,各种百度,还是没解决
其他博客教程都是给用户权限,或者就是利用mysql8.0版本的更新功能
这是更新教程的结果,基本上没用
后来自己想,既然是视图定义者不存在,建一个不就行了吗
提示不能用grant去新建用户,换一个
创建失败,具体看官方文档This bug has been sitting on bugs.mysql.com since 2007 and this thread is mainly just a parroting of all those wrong answers even up to a year ago.
雷踩得差不多了,接下来按下面操作,基本上都成功
drop user `mysql.infoschema`@"localhost";
// 这个部分`mysql.infoschema`@"localhost"就是连接数据库报错提示的用户与地址
flush privileges;
//刷新权限
create user `mysql.infoschema`@"localhost" identified by 'h102';
//`mysql.infoschema`@"localhost" 这个也要改成你报错的用户与地址
flush privileges;
到这里用户创建成功,登录会报错
ERROR 1356 (HY000): View ‘information_schema. SCHEMATA’…
具体报错忘记截图,大概是权限问题
use mysql;
update user set Select_priv = 'Y' where User = 'mysql.infoschema';
//这里注意用户名,也是你报错的用户名
flush privileges;
一系列操作下来,完美