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

#安装路径
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
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值