[root@chimeng01 ~]# mysqldump --user=root -p --all-databases > /tmp/backup/alldb.sql
Enter password:
mysqldump: Got error: 1556: You can't use locks with log tables. when using LOCK TABLES
slove:
[root@chimeng01 ~]# mysqldump --user=root -p --all-databases --lock-tables=0 > /tmp/backup/alldb.sql
Enter password:
[root@chimeng01 ~]#
[root@chimeng01 backup]# ll -h
total 3.1M
-rw-r--r-- 1 root root 2.6M Sep 24 17:27 abc2.sql
-rw-r--r-- 1 root root 10K Sep 24 17:53 abc3.sql
-rw-r--r-- 1 root root 10K Sep 24 17:53 abc4.sql
-rw-r--r-- 1 root root 0 Sep 24 18:02 abc5.sql
-rw-r--r-- 1 root root 1.7K Sep 24 17:22 abc.sql
-rw-r--r-- 1 root root 486K Sep 25 11:16 alldb.sql
-rw-r--r-- 1 root root 0 Sep 24 17:21 test.sql
alldb.sql 只備份到有關數據庫, 並沒有備份數據
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/28193163/viewspace-744988/
,如需转载,请注明出处,否则将追究法律责任。