数据库报错:The user specified as a definer (‘xxx‘) does not exist

「爱情、让人受尽委屈。」 2022-10-20 00:51 123阅读 0赞

报错内容

  1. ### Cause: java.sql.SQLException: The user specified as a definer ('xxx') does not exist
  2. ; uncategorized SQLException; SQL state [HY000]; error code [1449]; The user specified as a definer ('xxx') does not exist; nested exception is java.sql.SQLException: The user specified as a definer ('xxx') does not exist

原因

sql语句使用了视图,每个视图有自己的创建者,而当前数据库的用户中并没有这个视图指定的用户。于是报错

解决办法

  1. 在当前数据库中,使用新的用户重新创建这个视图
  2. 在当前数据库中创建需要的用户,或者重新设置视图创建者

发表评论

表情:
评论列表 (有 0 条评论,123人围观)

还没有评论,来说两句吧...

相关阅读