@llplmlyd
2020-12-25T05:57:33.000000Z
字数 1084
阅读 1133
数据库
myloader 默认会 启动 set session sql_log_bin=0,关闭导入数据产生的binlog
但是设置这个参数需要使用super权限
如果myloader 使用的账号 缺失super权限则该设置失效,即 导入数据会产生binlog
但是如果使用的账号 拥有 super 权限 那么 myloader 默认的配置就会生效,即导入数据默认不记录binlog
所以当使用高权限导入单个集群的主库 ,其他从库需要同步的情况下注意一定要把 -e 打开哦
Usage:myloader [OPTION?] multi-threaded MySQL loaderHelp Options:-?, --help Show help optionsApplication Options:-d, --directory Directory of the dump to import-q, --queries-per-transaction Number of queries per transaction, default 1000-o, --overwrite-tables Drop tables if they already exist-B, --database An alternative database to restore into-s, --source-db Database to restore-e, --enable-binlog Enable binary logging of the restore data-h, --host The host to connect to-u, --user Username with the necessary privileges-p, --password User password-a, --ask-password Prompt For User password-P, --port TCP/IP port to connect to-S, --socket UNIX domain socket file to use for connection-t, --threads Number of threads to use, default 4-C, --compress-protocol Use compression on the MySQL connection-V, --version Show the program version and exit-v, --verbose Verbosity of output, 0 = silent, 1 = errors, 2 = warnings, 3 = info, default 2--defaults-file Use a specific defaults file
