mysql 3306 主庫配置文件 [client]port = 3306default-character-set=utf8mb4socket = /ssd/mysql/3306/tmp/mysql.sock# Here follows entries for some specific prog ...
mysql 3306 主庫配置文件 [client] port = 3306 default-character-set=utf8mb4 socket = /ssd/mysql/3306/tmp/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] secure_file_priv="/" #!include /ssd/mysql/3306/etc/mysqld.cnf skip-slave-start character-set-server=utf8mb4 slave-skip-errors = 1062 log-slave-updates server-id=146 performance_schema = on port = 3306 basedir = /usr/local/mysql socket = /ssd/mysql/3306/tmp/mysql.sock pid-file = /ssd/mysql/3306/data/mysql.pid datadir = /ssd/mysql/3306/data tmpdir = /ssd/mysql/3306/tmp slave-load-tmpdir = /ssd/mysql/3306/tmp skip-external-locking skip-name-resolve max_connections = 4000 max_connect_errors = 4000 back_log=600 wait_timeout=150 interactive_timeout=150 default_storage_engine=innodb character_set_server=utf8mb4 key_buffer_size = 128M max_allowed_packet = 128M table_open_cache = 2048 thread_cache_size = 1000 query_cache_size = 256M thread_concurrency = 48 log-bin = mysql-bin #log-bin = 0 relay-log = relay-log relay_log_index = relay-log.index log-warnings = 1 log-error = /ssd/mysql/3306/log/mysql.err slow_query_log = 1 long-query-time = 2 slow_query_log_file = /ssd/mysql/3306/log/slow.log #general_log = 1 #general_log_file = /ssd/mysql/3306/log/mysql.log max_binlog_size = 1G max_relay_log_size = 1G expire_logs_days = 7 binlog_cache_size = 64M replicate-wild-ignore-table = mysql.% replicate-wild-ignore-table = test.% relay-log-purge = 1 key_buffer_size = 64M sort_buffer_size = 16M read_buffer_size = 16M join_buffer_size = 16M read_rnd_buffer_size = 64M bulk_insert_buffer_size = 64M myisam_sort_buffer_size = 64M myisam_max_sort_file_size = 256M myisam_repair_threads = 1 myisam_recover_options group_concat_max_len = 64K transaction_isolation = REPEATABLE-READ innodb_file_per_table innodb_file_format = Barracuda innodb_additional_mem_pool_size = 100M innodb_buffer_pool_size = 25G innodb_data_home_dir = /ssd/mysql/3306/data innodb_data_file_path = ibdata1:1G:autoextend innodb_file_io_threads = 4 innodb_read_io_threads =48 innodb_write_io_threads =48 innodb_io_capacity =600 innodb_thread_concurrency = 16 innodb_flush_log_at_trx_commit = 2 tmp_table_size = 128M innodb_log_buffer_size = 16M innodb_log_file_size = 512M innodb_log_files_in_group = 2 innodb_log_group_home_dir = /ssd/mysql/3306/data innodb_max_dirty_pages_pct = 90 innodb_lock_wait_timeout = 120 log-bin=mysql-bin binlog_format=mixed innodb_flush_method=O_DIRECT [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash [myisamchk] key_buffer_size = 64M sort_buffer_size = 64M read_buffer = 2M write_buffer = 2M [xtrabackup] default-character-set = utf8 mysql 3336 從庫配置文件 [client] port = 3336 default-character-set=utf8mb4 socket = /ssd/mysql/3336/tmp/mysql.sock # Here follows entries for some specific programs # The MySQL server [mysqld] secure_file_priv="/" #!include /ssd/mysql/3336/etc/mysqld.cnf skip-slave-start character-set-server=utf8mb4 slave-skip-errors = 1062 log-slave-updates server-id=147 performance_schema = on port = 3336 basedir = /usr/local/mysql socket = /ssd/mysql/3336/tmp/mysql.sock pid-file = /ssd/mysql/3336/data/mysql.pid datadir = /ssd/mysql/3336/data tmpdir = /ssd/mysql/3336/tmp slave-load-tmpdir = /ssd/mysql/3336/tmp skip-external-locking skip-name-resolve max_connections = 4000 max_connect_errors = 4000 back_log=600 wait_timeout=150 interactive_timeout=150 default_storage_engine=innodb character_set_server=utf8mb4 key_buffer_size = 128M max_allowed_packet = 128M table_open_cache = 2048 thread_cache_size = 1000 query_cache_size = 256M thread_concurrency = 48 log-bin = mysql-bin #log-bin = 0 relay-log = relay-log relay_log_index = relay-log.index log-warnings = 1 log-error = /ssd/mysql/3336/log/mysql.err slow_query_log = 1 long-query-time = 2 slow_query_log_file = /ssd/mysql/3336/log/slow.log #general_log = 1 #general_log_file = /ssd/mysql/3336/log/mysql.log max_binlog_size = 1G max_relay_log_size = 1G expire_logs_days = 7 binlog_cache_size = 64M replicate-wild-ignore-table = mysql.% replicate-wild-ignore-table = test.% relay-log-purge = 1 key_buffer_size = 64M sort_buffer_size = 16M read_buffer_size = 16M join_buffer_size = 16M read_rnd_buffer_size = 64M bulk_insert_buffer_size = 64M myisam_sort_buffer_size = 64M myisam_max_sort_file_size = 256M myisam_repair_threads = 1 myisam_recover_options group_concat_max_len = 64K transaction_isolation = REPEATABLE-READ innodb_file_per_table innodb_file_format = Barracuda innodb_additional_mem_pool_size = 100M innodb_buffer_pool_size = 25G innodb_data_home_dir = /ssd/mysql/3336/data innodb_data_file_path = ibdata1:1G:autoextend innodb_file_io_threads = 4 innodb_read_io_threads =48 innodb_write_io_threads =48 innodb_io_capacity =600 innodb_thread_concurrency = 16 innodb_flush_log_at_trx_commit = 2 tmp_table_size = 128M innodb_log_buffer_size = 16M innodb_log_file_size = 512M innodb_log_files_in_group = 2 innodb_log_group_home_dir = /ssd/mysql/3336/data innodb_max_dirty_pages_pct = 90 innodb_lock_wait_timeout = 120 log-bin=mysql-bin binlog_format=mixed innodb_flush_method=O_DIRECT [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash [myisamchk] key_buffer_size = 64M sort_buffer_size = 64M read_buffer = 2M write_buffer = 2M [xtrabackup] default-character-set = utf8