mysql — mysqldump错误:Got error: 1044: Access denied for user … when using LOCK TABLES

使用mysqldump备份数据时如果碰到如下错误提示:

Got error: 1044: Access denied for user … when using LOCK TABLES

那可能是你用来备份的数据库用户没有lock table的权限,可以换一个权限更高的用户,或者使用mysqldump的另一个选项:–single-transaction

mysqldump -uyourusername -pyourpassword –single-transaction yourdb > yourdb.sql

 

参考资料:http://bugs.mysql.com/bug.php?id=21527

添加一条评论 »本文共 2 条评论

  1. mysqldump -uroot -pxxxxxx –all-databases –single-transaction> allbackupfile.sql

    • mysqldump -uroot -pxxxxxx –all-databases –single-transaction > allbackupfile.sql

Copyright © All Rights Reserved · 菁菁博客 Since 2012 · Proudly powered by WordPress