Skip to content

记几个 mysql 参数

创建于: 2024-04-16

mysql8 连接串

&nullCatalogMeansCurrent=true
&serverTimezone=GMT%2B8
&socketTimeOut=60000

mysql5.7 部署

[mysqld]

max_connections=1000

#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated(专用) server, else 10%.

innodb_buffer_pool_size = 6G
innodb_buffer_pool_instances = 6
innodb_buffer_pool_chunk_size = 128M


max_heap_table_size = 128M
tmp_table_size = 128M

#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.

join_buffer_size = 128M
sort_buffer_size = 8M
read_rnd_buffer_size = 8M

read_buffer_size = 4M