mysql client之init-command


If the server is a replication master and you want to avoid replicating the content to replication slaves, use this command:

mysql --init-command="SET sql_log_bin=0" mysql < file_name


[root@localhost backup]# mysql -f --init-command='set sql_log_bin=0' < test.sql
ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty.









posted @ 2019-01-04 21:23  海东潮  阅读(746)  评论(0编辑  收藏  举报