[Client]
Port = 3306
Socket =/application/mysql-5.5.32/tmp/mysql.sock
[Mysqld]
Port = 3306
Socket =/application/mysql-5.5.32/tmp/mysql.sock
Back_log = 50
#最大连接数
max_connections = 100
#最大错误连接数
Max_connect_errors = 10
#表的描述符缓存大小
Table_open_cache = 2048
#最大的消息缓冲区
Max_allowed_packet = 16M
#二进制日志缓存大小
Binlog_cache_size = 1M
# maximum allowable size of a single HEAP (in-memory) table
Max_heap_table_size = 64M
#读缓冲区大小
Read_buffer_size = 2M
#随机读取数据缓冲区大小
Read_rnd_buffer_size = 16M
#排序缓冲区大小
Sort_buffer_size = 8M
#用于线程连接的缓冲区大小
Join_buffer_size = 8M
#缓存空闲的线程个数
Thread_cache_size = 8
#相同时间的线程所需数量 (variable is for Solaris system, this parameter is removed from version 5.6)
Thread_concurrency = 8
#查询缓存大小
Query_cache_size = 64M
#单个查询缓存大小
Query_cache_limit = 2M
#全文检索最小长度
Ft_min_word_len = 4
#MySQL默认表类型
Default-storage-engine = MYISAM
#线程堆栈大小
Thread_stack = 192K
#MySQL数据库事务隔离级别
#READ-uncommitted (Read UNCOMMITTED content) level
#READ-committed (Read submissions)
#REPEATABLE-read (can be reread)
#SERIERLIZED (Serializable)
Transaction_isolation = Repeatable-read
#内存内的临时表大小
Tmp_table_size = 64M
#二进制日志
Log-bin=mysql-bin
#二进制日志格式
Binlog_format=mixed
#慢查询日志
Slow_query_log
#慢查询超过时间
Long_query_time = 2
#数据库服务id (Uniqueness)
Server-id = 1
#索引缓冲区的大小
Key_buffer_size = 32M
#缓存批量插入数据的时候临时缓存写入数据
Bulk_insert_buffer_size = 64M
#MyISAM表发生变化时重新排序所需的缓冲
Myisam_sort_buffer_size = 128M
#如果一个表拥有超过一个索引, MyISAM can use more than one thread to fix them by using parallel sorting.
Myisam_max_sort_file_size = 10G
#自动检查和修复没有适当关闭的 MyISAM Table
Myisam_repair_threads = 1
#选择Myisam查找和修复错误的方式
Myisam_recover
Memory pool size for #InnoDB stored data directory information and other internal data structures
Innodb_additional_mem_pool_size = 16M
#缓存用户表及索引数据的最主要缓存空间
Innodb_buffer_pool_size = 2G
#设置innoDB数据文件的位置和大小, this variable is a core element of MySQL server capacity planning and performance scaling capabilities
Innodb_data_file_path = Ibdata1:10m:autoextend
Number of threads during database write operations
Innodb_write_io_threads = 8
Number of threads during database read operations
Innodb_read_io_threads = 8
InnoDB the number of threads allowed inside the kernel.
Innodb_thread_concurrency = 16
#日志缓冲被写到日志文件, the frequency at which disk operations are refreshed for log files
Innodb_flush_log_at_trx_commit = 1
#设置日志可以使用的最大内存空间
Innodb_log_buffer_size = 8M
#设置日志可以使用的大小
Innodb_log_file_size = 256M
#以循环方式将日志文件写到多个文件
Innodb_log_files_in_group = 3
#用来控制在 InnoDB Buffer Pool can be used without writing the scale of the dirty Page in the data file (dirty data that has been repaired but has not been written to the data file from memory)
innodb_max_dirty_pages_pct = 90
#innodb的这个锁等待超时时间
Innodb_lock_wait_timeout = 120
[Mysqldump]
Quick
#消息缓冲区的大小
Max_allowed_packet = 16M
[MySQL]
#不使用自动补全
No-auto-rehash
[Myisamchk]
#索引缓冲区的大小
Key_buffer_size = 512M
#排序缓冲区大小
Sort_buffer_size = 512M
#读缓冲区
Read_buffer = 8M
#写缓冲区
Write_buffer = 8M
[Mysqlhotcopy]
#MySQL在等待一个活动连接关闭连接前等待的秒数
Interactive-timeout
[Mysqld_safe]
#最大打开文件数
Open-files-limit = 8192
This article is from the "truth-seeking" blog, please be sure to keep this source http://lifhd.blog.51cto.com/4399373/1725365
MySQL configuration file my-innodb-heavy-4g.cnf comments