[client] default-character-set=utf8 [mysqld] user=mysql #For 5.7 add time_zone default-time_zone='+8:00' log_timestamps='SYSTEM' #character set character-set-server=utf8 collation-server=utf8_bin basedir=/usr datadir=/DATA/my3306 port=3306 socket=/DATA/my3306/mysql.sock pid_file=mysqld.pid tmpdir=/DATA/my3306 innodb_data_file_path=ibdata1:2G;ibdata2:100M:autoextend innodb_file_per_table=1 server_id=30413306 # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 #log set log_error=/DATA/my3306/alert.log log-output=FILE slow_query_log=1 slow_query_log_file=/DATA/my3306/slow.log long_query_time=0.5 general_log_file=/DATA/my3306/general.log general_log=0 innodb_flush_method=O_DIRECT #binlog & relaylog binlog_rows_query_log_events=1 log_bin=mysql-bin log_slave_updates=1 binlog_format=row relay_log=mysql-relay-bin expire_logs_days=14 #gtid_mode=on #enforce_gtid_consistency=1 binlog_cache_size=4M max_binlog_cache_size=2G max_binlog_size=1G open_files_limit=64000 transaction-isolation=READ-COMMITTED skip-name-resolve=1 interactive_timeout=7200 wait_timeout=7200 innodb-status-file=1 back_log=1024 max_connections=2000 max_connect_errors=1000000 max_allowed_packet=64M explicit_defaults_for_timestamp=true table_open_cache=1024 table_definition_cache=1024 table_open_cache_instances=64 thread_stack=512K sort_buffer_size=4M join_buffer_size=4M thread_cache_size=768 query_cache_size=0 query_cache_type=0 tmp_table_size=32M max_heap_table_size=32M key_buffer_size=32M read_buffer_size=8M read_rnd_buffer_size=4M bulk_insert_buffer_size=64M innodb_thread_concurrency=0 innodb_sync_spin_loops=30 innodb_spin_wait_delay=6 innodb_adaptive_hash_index=0 #memery set innodb_buffer_pool_size=90G innodb_log_buffer_size=32M innodb_log_file_size=100M innodb_log_files_in_group=3 innodb_max_undo_log_size=4G innodb_lock_wait_timeout=15 #For buffer warm innodb_buffer_pool_dump_at_shutdown=on innodb_buffer_pool_load_at_startup=on innodb_buffer_pool_instances=16 innodb_write_io_threads=8 innodb_read_io_threads=8 innodb_purge_threads=16 innodb_page_cleaners=16 innodb_open_files=64000 innodb_max_dirty_pages_pct=50 innodb_lru_scan_depth=4000 innodb_checksum_algorithm=crc32 innodb_rollback_on_timeout=1 innodb_print_all_deadlocks=1 innodb_online_alter_log_max_size=4G internal_tmp_disk_storage_engine=InnoDB innodb_status_file=1 #innodb_status_output=1 #innodb_status_output_locks=1 innodb_stats_on_metadata=0 #data security innodb_flush_log_at_trx_commit=1 sync_binlog=1 #sql-mode set sql-mode=NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES innodb_io_capacity=4000 innodb_io_capacity_max=4000 #performance_schema performance_schema=1 #innodb monitor #innodb_monitor_enable="module_innodb" #innodb_monitor_enable="module_server" #innodb_monitor_enable="module_dml" #innodb_monitor_enable="module_ddl" #innodb_monitor_enable="module_trx" #innodb_monitor_enable="module_os" #innodb_monitor_enable="module_purge" #innodb_monitor_enable="module_log" #innodb_monitor_enable="module_lock" #innodb_monitor_enable="module_buffer" #innodb_monitor_enable="module_index" #innodb_monitor_enable="module_ibuf_system" #innodb_monitor_enable="module_buffer_page" #innodb_monitor_enable="module_adaptive_hash" #For slave slave-parallel-type=LOGICAL_CLOCK slave-parallel-workers=8 #master_info_repository=TABLE #relay_log_info_repository=TABLE #relay_log_recovery=ON #skip-slave-start #For restore no conflict auto_increment_increment=2 auto_increment_offset=2 [mysqldump] quick max_allowed_packet=64M