Mysq已优化的配置文件my.ini


[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4
[mysqld]
#服务Id
server-id     = 1
#绑定地址
bind-address  = 127.0.0.1
#绑定端口
port          = 3306
socket        = "D:/server/Program Files/mysql5.6/mysql.sock"
basedir       = "D:/server/Program Files/mysql5.6" 
tmpdir        = "D:/server/Program Files/mysql5.6/tmp" 
datadir       = "D:/server/Program Files/mysql5.6/data"
pid_file      = "D:/server/Program Files/mysql5.6/mysql.pid"

 #数据库服务编码
 character_set_server    = utf8

#索引缓冲区的大小
key_buffer_size         = 64M
#网络传输时单个数据包的大小
max_allowed_packet      = 1024M
#每个会话执行排序操作所分配的内存大小
sort_buffer_size        = 2M
#每个客户端线程和连接缓存和结果缓存交互
net_buffer_length       = 512K
#顺序读取buffer大小
read_buffer_size        = 2M
#随机读所使用的内存
read_rnd_buffer_size    = 2M
#索引排序使用的缓存大小
myisam_sort_buffer_size = 8M
#允许的最大连接数
max_connections         = 5000
#允许增长的最大容量
max_heap_table_size     = 64M
#分组拼接的最大长度
group_concat_max_len    = 10M
#host缓存大小
host_cache_size         = 853
#查询结果所分配的缓存
query_cache_size        = 64M
#服务缓存以重用的线程数
thread_cache_size       = 100
#存储引擎的事务日志所使用的缓冲区
innodb_log_buffer_size  = 16M
#缓存数据块和索引块
innodb_buffer_pool_size = 10G
#在MySQL暂时停止回答新请求之前的短时间内多少个请求可以被存在堆栈中
back_log                = 3000
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_bin
init_connect='SET NAMES utf8mb4'
innodb_log_file_size=1000M 
#sql_mode
=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES sql_mode=NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

 

posted @ 2022-03-09 10:51  IT民工郑小江  阅读(48)  评论(0编辑  收藏  举报