First configuration
[client]port = 3306socket = /tmp/mysql.sockdefault-character-set = utf8[mysqld]default-character-set = utf8user = mysqlport = 3306socket = /tmp/mysql.sockbasedir = /usr/local/mysqldatadir = /data/mysql/ Datalog-error = /data/mysql/mysql-error.logpid-file = /data/mysql/mysql.pidft_min_word_len = 1old-passwords = 1log_slave_updates = 1log-bin = /data/mysql/binlog /mysql-binbinlog_format = mixedbinlog_cache_size = 4mmax_binlog_cache_size = 8mmax_binlog_size = 1gexpire_logs_days = 90binlog-ignore-db = Mysqlbinlog-ignore-db = testbinlog-ignoRe-db = information_schemakey_buffer_size = 384mread_buffer_size = 4mread_rnd_ Buffer_size = 16msort_buffer_size = 8mjoin_buffer_size = 8mthread_cache_size = 8query_cache_size = 32mquery_cache_limit = 2mquery_cache_min_res_unit = 2kthread_concurrency = 8table_cache = 614table_open_cache = 512open-files-limit = 10240back_log = 600max_connections = 5000max_connect_ errors = 6000external-locking = falsemax_allowed_packet = 16mdefault-storage-engine = myisamthread_stack = 256ktransaction_isolation = Repeatable-readtmp_table_size = 256mmax_heap_table_size = 512mbulk_insert_buffer_size = 64mmyisam_sort_buffer_size = 64mmyisam_max_sort_file_size = 10gmyisam_repair_ Threads = 1myisam_recoverlong_query_time = 2slow_query_logslow_query_log_file = /data/mysql/slow.logskip-lockingskip-name-resolveserver-id = 1innodb_additional_mem_pool_size = 16minnodb_buffer_pool_size = 512minnodb_data_file _path = ibdata1:10m:autoextendinnodb_file_io_threads = 4innodb_thread_concurrency = 8innodb_flush_log_at_trx_commit = 1innodb_log_buffer_size = 16minnodb_log_file_size = 128minnodb_log_files_in_group = 3innodb_max_dirty_pages_pct = 90innodb_lock_ wait_timeout = 120innodb_file_per_table = 0[mysqldump]quickmax_allowed_packet = 16m[mysql]no-auto-rehashremove the next comment character if you are Not familiar with sqlsafe-updates[myisamchk]key_buffer_size = 256msort_buffer_size = 256mread_buffer = 2mwrite_buffer = 2m[mysqlhotcopy]interactive-timeout
second configuration
[client]port= 5660socket= /tmp/mysql5660.sockcharacter_set_server = utf8[mysqld]port= 5660socket= /tmp/mysql5660.sockuser= mysqldatadir= /u2/mysql5660/databack_log = 500#skip-networking#skip-grant-tablescharacter_set_server = utf8max_connections = 300#max_user_connections = 1000gtid_mode=onenforce-gtid-consistency=1explicit_defaults_for_timestamp = 1thread_handling=pool-of-threadsthread_pool_oversubscribe=25#percona#innodb_recovery_update_relay _log=1skip_name_resolve=1max_connect_errors = 10240table_open_cache = 2048max_allowed_ Packet = 16mbinlog_cache_size = 1mmax_heap_table_size = 64mread_buffer_size = 512kread_rnd_buffer_size = 16msort_buffer_size = 512kjoin_buffer_size = 512kthread_cache_size = 64thread_concurrency = 32query_cache_size = 0# Query_cache_limit = 2m#ft_Min_word_len = 4#memlockthread_stack = 192k# read-uncommitted, read-committed, repeatable-read, serializabletransaction_isolation = read-committedtmp_table_size = 64mlog-bin=/u2/mysql5660/logs/mysql-binmax_binlog_size=256mbinlog_format=mixedlog_slave_updates#loglog_ error = /u2/mysql5660/data/error.loglog_warningsslow_query_log#slow_query_log=/u2/mysql5660/data/ Slow.loglong_query_time = 1tmpdir = /u2/mysql5660/tmpserver-id = 115660key_ buffer_size = 64mbulk_insert_buffer_size = 64mmyisam_sort_buffer_size = 128mmyisam_max_sort_file_size = 10gmyisam_repair_threads = 1myisam-recover-options# * ** innodb specific options *** #innodb_additional_mem_pool_size = 16minnodb_ Buffer_pool_size = 2ginnodb_data_file_path = ibdata1:100m:autoextendinnodb_data_home_dir =/u2/mysql5660/datainnodb_file_per_table=1innodb_write_io_threads = 16innodb_read_io_threads = 16#innodb_force_recovery= 1innodb_thread_concurrency = 0innodb_flush_log_at_trx_commit = 0#innodb_fast_ Shutdowninnodb_log_buffer_size = 16minnodb_log_file_size = 256minnodb_log_files_in_group = 3innodb_log_group_home_dir=/u2/mysql5660/datainnodb_max_dirty_pages_pct = 90innodb_ flush_method=o_directinnodb_lock_wait_timeout = 10[mysqldump]quickmax_allowed_packet = 16m [mysql]no-auto-rehash# only allow updates and deletes that use keys.# safe-updates[myisamchk]key_buffer_size = 512msort_buffer_size = 512mread_buffer = 8mwrite_buffer = 8m[mysqlhotcopy]interactive-timeout[mysqld_safe]# increase the amount of open files allowed per process. Warning: Make# sure you have set the&Nbsp;global system limit high enough! the high value# is required for a large number of opened tablesopen-files-limit = 8192
This article is from the "Zheng" blog, make sure to keep this source http://467754239.blog.51cto.com/4878013/1544945
MySQL on-line configuration file