附录:
附录1:mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user ‘root’@‘localhost’ for table ‘cond_instances’ when using LOCK TABLES
在mysql5.5中增加了performance_schema,当我们进行mysqldump的时候,会报如下错误信息:
mysqldump: Got error: 1142: SELECT,LOCK TABL command denied to user ‘root’@‘localhost’ for table ‘cond_instances’ when using LOCK TABLES
我们可以在mysqldump中加上参数 –skip-lock-tables,如
# mysqldump -uroot -p --skip-lock-tables performance_schema > performance_schema.sql
或者过滤掉performance_schema这个库
# mysql -e "show databases;" -uroot -p| grep -Ev "Database|information_schema|mysql|test|performance_schema" | xargs mysqldump -uroot -p --databases > mysql_dump.sql
mysqldump备份数据库时排除某些库
标签:
本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉
本文系统来源:http://www.cnblogs.com/hllnj2008/p/5206449.html