mysql 参数优化
最大连接数 优化:http://database.51cto.com/art/201010/229936.htm
- max_connections=1000
表高速缓存区大小 优化地址 : http://www.cnblogs.com/fjping0606/p/6531292.html
- table_open_cache=256
开启查询缓存 优化地址:http://www.jb51.net/article/58537.htm
- query_cache_type=1
查询缓存大小
- query_cache_size=1M
临时表大小 优化地址:http://www.jb51.net/article/85341.htm
- tmp_table_size=32M
线程缓存数 http://www.jb51.net/article/51828.htm
- thread_cache_size=8
关闭DNS做反向地址查询 http://blog.chinaunix.net/uid-9370128-id-1687475.html
- skip-name-resolve=1
忘记密码后进行密码重置
- skip-grant-tables=1
innodb_flush_log_at_trx_commit和sync_binlog 两个参数是控制MySQL 磁盘写入策略 http://blog.itpub.net/22664653/viewspace-1063134/
- innodb_flush_log_at_trx_commit =2
- sync_binlog=5000
慢查询配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25slow_query_log=1
long_query_time=5
slow_query_log_file="D:/MySQL/data/query-slow-file.log"
innodb_log_buffer_size=128M
innodb_buffer_pool_size=128M
innodb_log_file_size=10M
innodb_thread_concurrency=16
innodb-autoextend-increment=1000
join_buffer_size = 128M
sort_buffer_size = 32M
read_rnd_buffer_size = 32M
max_allowed_packet = 32M关闭警告 http://www.jb51.net/article/71105.htm
- explicit_defaults_for_timestamp=true
sql模式 http://blog.csdn.net/zhaoxuejie/article/details/50844380
- sql-mode=”STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”