加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > MsSql教程 > 正文

数据库 – mysqldump错误LOCK TABLES

发布时间:2020-12-12 16:47:16 所属栏目:MsSql教程 来源:网络整理
导读:当我执行 mysqldump时,我得到以下错误: mysqldump -u root -ppassword --databases information_schema test.sqlmysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES 我怎样才
当我执行 mysqldump时,我得到以下错误:
mysqldump -u root -ppassword --databases information_schema > test.sql
mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES

我怎样才能解决这个问题?

解决方法

如果必须转储information_schema数据库,则向其添加–skip-lock-tables.

mysqldump does not dump the
INFORMATION_SCHEMA database by
default. As of MySQL 5.1.38,mysqldump
dumps INFORMATION_SCHEMA if you name
it explicitly on the command line,
although currently you must also use
the –skip-lock-tables option. Before
5.1.38,mysqldump silently ignores INFORMATION_SCHEMA even if you name it
explicitly on the command line.

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读