mysql client之init-command

慕凡
2023-12-01
 
 

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.









转载于:https://www.cnblogs.com/DataArt/p/10222567.html

 类似资料: