错误场景
ERROR 1449 (HY000): The user specified as a definer ('mysql.infoschema'@'localhost') does not exist
查询是否有这个账户
select user,host from mysql.user where user='mysql.infoschema';
查看这个账户的权限
show grants for 'mysql.infoschema'@'localhost';
删除这个mysql.infoschema
DROP USER 'mysql.infoschema'@'localhost';
创建mysql.infoschema
CREATE USER 'mysql.infoschema'@'localhost' IDENTIFIED BY 'password';
授权
GRANT SELECT ON *.* TO `mysql.infoschema`@`localhost`;