利用mysqldump导入数据库报错:The user specified as a definer (‘root’@’%’) does not exist when using LOCK TABLES

段落导航
The user specified as a definer (‘root’@’%’) does not exist when using LOCK TABLES

出现这个问题是因为创建数据库的用户已经不存在了,需要把数据库授权给root然后再执行导出即可。

grant all privileges on *.* to root@"%" identified by ".";
浮云 avatar
浮云
江天一色无纤尘,皎皎空中孤月轮。