mysql5.5.48的my.cnf配置
MYSQL配置
default-storage-engine=MyISAM
# 最大连接数
max_connections=1500
# 二进制日志
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
[client] port = 3306 socket = /tmp/mysql.sock [mysqld] port = 3306 default-storage-engine=MyISAM max_connections=1500 socket = /tmp/mysql.sock skip-external-locking skip-innodb key_buffer_size = 4096M bulk_insert_buffer_size = 64M myisam_max_sort_file_size = 40G max_allowed_packet = 32M table_open_cache = 3600 open_files_limit=65535 tmp_table_size=256M sort_buffer_size = 4M read_buffer_size = 16M query_cache_min_res_unit = 2k read_rnd_buffer_size = 16M myisam_sort_buffer_size = 128M thread_cache_size = 256 query_cache_type=1 query_cache_size= 128M innodb_buffer_pool_size = 1024M skip-name-resolve wait_timeout=200 thread_concurrency = 8 innodb_buffer_pool_instances = 35 innodb_file_per_table = 1 datadir = /data/mydata log-bin=/data/binlogs/mysql-bin binlog-do-db=TD_OA expire_logs_day=30 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 [myisamchk] key_buffer_size = 1024M sort_buffer_size = 512M read_buffer = 256M write_buffer = 256M [mysqlhotcopy] interactive-timeout# 默认引擎
default-storage-engine=MyISAM
# 最大连接数
max_connections=1500
数据存储目录
datadir = /data/mydata# 二进制日志
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
修复表命令:
# mysqlcheck -r TD_OA SYS_LOG -uroot -p