mysql报错:The user specified as a definer ('skip-grants user'@'skip-grants host') does not exist

起因是:我从另一台电脑将数据库导出成sql文件,然后在本电脑运行sql文件,结构和数据没有问题,但是要插入数据的时候报The user specified as a definer ('skip-grants user'@'skip-grants host') does not exist 的错误

找了一些文档,发现是权限问题,创建那些数据所用的用户在本电脑上不存在,所以这边的用户没有权限操作数据库

解决办法是给用户添加权限

新建查询,执行以下语句

grant all privileges on *.* to 'skip-grants user'@'skip-grants host' identified by "."

框框里面的对应就行了 

mysql报错:The user specified as a definer ('skip-grants user'@'skip-grants host') does not exist_第1张图片

你可能感兴趣的:(mysql报错:The user specified as a definer ('skip-grants user'@'skip-grants host') does not exist)