Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.

    xiaoxiao2021-03-25  94

    [root@localhost ~]# mysqldump --all-databases --single-transaction --master-data=1 --flush-logs --result-file=dump.sql  -S /tmp/mysql3306.sock -- Warning: Skipping the data of table MySQL.event. Specify the --events option explicitly.

    MySQL用mysqldump导出数据库时提示“-- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.”

    这是因为mysqldump默认是不备份事件表的,解决办法:

    1、加上--events \ -E       (这样就会备份事件表)

    [root@localhost ~]# mysqldump --all-databases --single-transaction --master-data=1 --flush-logs --result-file=dump.sql  -E -S /tmp/mysql3306.sock [root@localhost ~]#

    2、加上--ignore-table=mysql.event    (这样就显示地不会备份事件表)

    [root@localhost ~]# mysqldump --all-databases --single-transaction --master-data=1 --flush-logs --result-file=dump.sql --ignore-table=mysql.event -S /tmp/mysql3306.sock [root@localhost ~]#

    转载请注明原文地址: https://ju.6miu.com/read-14228.html

    最新回复(0)