mysql5.5.48的my.cnf配置

MYSQL配置

[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock


# The MySQL server
[mysqld]
port = 3306
# 默认引擎
default-storage-engine=MyISAM
# 最大连接数
max_connections=1500
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 4096M
max_allowed_packet = 64M
table_open_cache = 2400
tmp_table_size=256M
sort_buffer_size = 16M
read_buffer_size = 16M
read_rnd_buffer_size = 16M
myisam_sort_buffer_size = 128M
thread_cache_size = 256
query_cache_type=0
query_cache_size= 512M
innodb_buffer_pool_size = 1024M
skip-name-resolve
wait_timeout=300
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
innodb_buffer_pool_instances = 35
innodb_file_per_table = 1
datadir = /data/mydata


#skip-networking
# 二进制日志
log-bin=/data/binlogs/mysql-bin
# 只记录TD_OA的日志
binlog-do-db=TD_OA
# 保留30天日志
expire_logs_day=30
# 日志单个文件最大200M
max_binlog_size = 200M
# 开启慢日志
slow_query_log=ON
slow-query-log-file=/data/binlogs/slow_query.log
# 慢日志为超过两秒的记录
long_query_time=2
log_bin_trust_function_creators=1

binlog_format=mixed


server-id = 1


[mysqldump]
quick
max_allowed_packet = 64M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 1024M
sort_buffer_size = 512M
read_buffer = 256M
write_buffer = 256M


[mysqlhotcopy]
interactive-timeout

你可能感兴趣的:(mysql5.5.48的my.cnf配置)