别人的MARK下
[client] port = 3306 default-character-set=utf8 socket = /usr/local/mysql/tmp/mysql.sock [mysqld] log_bin_trust_function_creators = 1 character-set-server = utf8 port = 3306 socket = /usr/local/mysql/tmp/mysql.sock basedir = /usr/local/mysql datadir = /data/dbdata back_log = 100 max_connections = 500 max_connect_errors = 100000 table_cache = 624 external-locking = FALSE max_allowed_packet = 16M sort_buffer_size = 8M join_buffer_size = 4M thread_cache_size = 128 query_cache_size = 128M query_cache_limit = 2M query_cache_min_res_unit = 2k default-storage-engine = INNODB thread_stack = 192K transaction_isolation = REPEATABLE-READ tmp_table_size = 128M max_heap_table_size = 128M slow_query_log long_query_time = 0.5 log-bin binlog_format = MIXED binlog_cache_size = 4M max_binlog_cache_size = 8M max_binlog_size = 512M key_buffer_size = 256M read_buffer_size = 8M read_rnd_buffer_size = 8M bulk_insert_buffer_size = 64M myisam_sort_buffer_size = 128M myisam_max_sort_file_size = 10G myisam_repair_threads = 1 myisam_recover interactive_timeout = 28800 wait_timeout = 28800 skip-name-resolve server-id = 1 innodb_buffer_pool_size = 20G innodb_additional_mem_pool_size = 20M innodb_data_file_path = ibdata1:256M:autoextend innodb_file_io_threads = 8 innodb_thread_concurrency = 16 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 16M innodb_log_file_size = 512M innodb_log_files_in_group = 3 innodb_flush_method=O_DIRECT #5.5的添加了innodb_io_capacity参数 #innodb_io_capacity=500 innodb_support_xa=0 innodb_max_dirty_pages_pct = 75 innodb_lock_wait_timeout = 120 innodb_file_per_table = 1 [myisamchk] key_buffer_size = 512M sort_buffer_size = 512M read_buffer = 8M write_buffer = 8M [mysqldump] quick max_allowed_packet = 32M [mysqld_safe] open-files-limit = 10240