centos7+mysql5.7下的数据库参数配置

来源:互联网 发布:虚拟充值软件靠谱吗 编辑:程序博客网 时间:2024/06/07 06:09
#安装路径
basedir = /data/iqmkj/works/program/mysql
#数据存放路径
datadir = /data/iqmkj/works/program/mysql/data
#端口号
port = 3306
socket = /data/iqmkj/works/program/mysql/tmp/mysql.sock
 
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#default-character-set=utf8
character-set-server=utf8
init_connect='SET NAMES utf8'

wait_timeout=300
back_log = 500
max_connections = 3000
max_connect_errors = 6000
external-locking = FALSE
max_allowed_packet = 64M
sort_buffer_size = 2M
join_buffer_size = 2M
thread_cache_size = 300
query_cache_size = 64M
query_cache_limit = 4M
query_cache_min_res_unit = 2k
default-storage-engine = MyISAM
thread_stack = 192K
transaction_isolation = READ-COMMITTED
tmp_table_size = 256M
max_heap_table_size = 256M
long_query_time = 2
binlog_cache_size = 4M
max_binlog_cache_size = 8M
max_binlog_size = 512M
expire_logs_days = 3
key_buffer_size = 2048M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
lower_case_table_names = 1
innodb_buffer_pool_size = 2048M
innodb_thread_concurrency = 8
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 16M
innodb_log_file_size = 128M
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_file_per_table = 0


[client]
socket = /data/iqmkj/works/program/mysql/tmp/mysql.sock
default-character-set=utf8

[mysql]
default-character-set=utf8

[mysqld_safe]
#日志路径

log-error=/var/log/mysql/mysqld.log



1 0
原创粉丝点击