Mysql配置文件详解 my.cof

Mysql配置文件详解

  

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
# Suitable for 4G R0M configuration

[mysql]
#default-character-set = utf8mb4

[mysqld]
tmpdir=/data/tmp
lower_case_table_names = 1
ft_min_word_len = 1
character_set-server = utf8mb4
collation_server = utf8mb4_unicode_ci
net_read_timeout=3600
net_write_timeout=3600
innodb_file_per_table=1
max_allowed_packet = 300M

#ibdata1为innodb的共享表空间,用来存储文件的数据 ibdata2满后增长,约是ibdata1的1/10

innodb_data_file_path = ibdata1:3072M;ibdata2:307M:autoextend
skip-name-resolve
#skip-grant-tables
# 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 = 128M
#  innodb_force_recovery = 6 
#  innodb_purge_thread = 0
innodb_buffer_pool_size = 256M
innodb_log_file_size = 64M
max_connections = 1000
query_cache_size = 32M
query_cache_type = 1
query_cache_limit = 65536
innodb_ft_cache_size = 1000000
innodb_ft_result_cache_limit = 50000000

key_buffer_size = 524163
read_buffer_size = 8191

tmp_table_size=16M
max_heap_table_size=16M

slow-query-log=1
slow-query-log-file=/data/mysql/mysql-slow.log
long_query_time=1

wait_timeout=2880000
interactive_timeout=2880000
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
datadir = /data/mysql/data/
# port = .....
# server_id = .....
# socket = .....

# 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 = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

 

posted @ 2018-12-28 13:13  cheney-yang  阅读(855)  评论(0编辑  收藏  举报