已解决:The user specified as a definer (‘root’@’%’) does not exist

起因:从本地迁移到线上时发生报错

原因

排查后发现是本地导出sql时创建view表语句的原因

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `x_jeeinn_table_view`
AS SELECT
    ...;

  • 本地使用的是root测试帐号
  • 线上使用的是xxx帐号

解决

将建表语句用户名root批量改为xxx重新导入即可

Author: thinkwei

1 thought on “已解决:The user specified as a definer (‘root’@’%’) does not exist

回复 http://hurrieddrudge1227.jimdo.com/ 取消回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注