mysql配置文件参数简析

下文内容主要给大家带来MySQL配置文件参数简析,这里所讲到的知识,与书籍略有不同,都是创新互联专业技术人员在与用户接触过程中,总结出来的,具有一定的经验分享价值,希望给广大读者带来帮助。

创新互联专注于企业全网营销推广、网站重做改版、东山网站定制设计、自适应品牌网站建设、H5场景定制商城网站开发、集团公司官网建设、成都外贸网站制作、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为东山等各大城市提供网站开发制作服务。

今晚要创建十几套mysql数据库,贴一个mysql配置文件参数供参考:

cat /etc/my.cnf
[mysql]
#CLIENT #
port                           = 3307
socket                         = /data/mysql_3307/data/mysql.sock
default-character-set          = utf8
#
[mysqld]
#
port                           = 3307
# GENERAL #
user                           = mysql
default-storage-engine         = InnoDB
socket                         = /data/mysql_3307/data/mysql.sock
pid-file                       = /data/mysql_3307/data/mysql.pid
character_set_server           = utf8
#
# MyISAM #
key-buffer-size                = 32M
myisam-recover-options         = FORCE,BACKUP
#
# SAFETY #
max-connections                = 100000
max-allowed-packet             = 256M
max-connect-errors             = 1000000
skip-name-resolve
sysdate-is-now                 = 1
lower_case_table_names         = 1
explicit_defaults_for_timestamp = 1
symbolic-links                 = 0
#
# DATA STORAGE #
basedir                        = /usr/local/mysql
datadir                        = /data/mysql_3307/data
#
# BINARY LOGGING #
server-id                      = 56100
log-bin                        = /data/mysql_3307/data/mysql-bin
expire-logs-days               = 14
sync-binlog                    = 1
log_bin_trust_function_creators  = 1
transaction_isolation = READ-COMMITTED
mysql配置文件参数简析
# GITD MODE  #
gtid_mode                      = ON
enforce-gtid-consistency       = 1
binlog_cache_size              = 4M
max_binlog_size                = 1G
max_binlog_cache_size          = 2G
#
# REPLICATION #
skip-slave-start               = 0
relay-log                      = /data/mysql_3307/data/relay-bin
slave-net-timeout              = 60
sync-master-info               = 0
sync-relay-log                 = 0
sync-relay-log-info            = 0
slave_pending_jobs_size_max    = 256M
binlog_group_commit_sync_delay = 100000


#
#rpl_semi_sync_master_enabled=1
#rpl_semi_sync_master_timeout=10000# 表示10 second
#rpl_semi_sync_slave_enabled=1
#
slave-parallel-type            = LOGICAL_CLOCK
slave-parallel-workers         = 24
master_info_repository         = TABLE
relay_log_info_repository      = TABLE
relay_log_recovery             = ON
# CACHES AND LIMITS #
tmp-table-size                 = 32M
max-heap-table-size            = 32M
query-cache-type               = 0
query-cache-size               = 0
thread-cache-size              = 300
open-files-limit               = 65535
table-definition-cache         = 4096
table-open-cache               = 4096
#
# INNODB #
innodb-flush-method            = O_DIRECT
innodb-log-files-in-group      = 5
innodb-log-file-size           = 2048M
innodb-flush-log-at-trx-commit = 1
innodb-file-per-table          = 1
innodb-buffer-pool-size        = 300G
innodb_io_capacity             = 10000
innodb_io_capacity_max         = 20000
innodb_write_io_threads        = 16
innodb_read_io_threads         = 16
innodb_flush_neighbors         = 0
innodb_buffer_pool_instances   = 16
innodb_max_dirty_pages_pct     = 75

# LOGGING #
log-error                      = /logs/mysql_3307/mysql-error.log
log_timestamps                 = SYSTEM
log-queries-not-using-indexes  = 0
slow-query-log                 = 1
slow-query-log-file            = /logs/mysql_3307/mysql-slow.log
long_query_time = 1
#
[mysqladmin]
port                           = 3307
socket                         = /data/mysql_3307/data/mysql.sock

[mysqldump]
port                           = 3307
socket                         = /data/mysql_3307/data/mysql.sock


#
[xtrabackup]
port                           = 3307
socket                         = /data/mysql_3307/data/mysql.sock

[mysqlbackup]
port                           = 3307
socket                         = /data/mysql_3307/data/mysql.sock

对于以上关于mysql配置文件参数简析,如果大家还有更多需要了解的可以持续关注我们创新互联的行业推新,如需获取专业解答,可在官网联系售前售后的,希望该文章可给大家带来一定的知识更新。

 


当前文章:mysql配置文件参数简析
URL标题:http://azwzsj.com/article/ijgdcc.html