mysqldump导出时出现when doing LOCK TABLES

  执行 mysqldump -uxxx -pxxx -hxxx -Pxxxx database tablename > tablename.sql 
导出表时,会报

mysqldump: Got error: 1044: Access denied for user 'xxx'@'xxx' to database 'xxx' when doing LOCK TABLES

解决方法:添加 --skip-lock-tables选项则能正常导出 
 
mysqldump --skip-lock-tables -uxxx -pxxx -hxxx -Pxxxx database tablename > tablename.sql

你可能感兴趣的:(mysql,mysqdump,导数据)