santaclaus 发表于 2016-10-22 07:17:50

MySQL错误:The user specified as a definer (XXX@XXX) does not exist

  使用HeidiSQL从Linux导出MySQL数据库,然后恢复到本地(Windows)
  
  但是连数据库进行查询时报异常:

The user specified as a definer ('db_chf'@'xxxxx'
) does not exist
  
  意思是某个数据库对象的定义者(也就是'db_chf'@'xxxxx'
)不存在
  
  
  后来终于找到了原因,原来是导出并恢复数据库时,视图的定义者还是原来的用户:'db_chf'@'xxxxx'

  
  但是本地数据库并没有db_chf这个用户,只有root用户,所以只要将视图的定义者修改为root即可解决问题。

  
页: [1]
查看完整版本: MySQL错误:The user specified as a definer (XXX@XXX) does not exist