mysql配置文件参数简析-创新互联
下文内容主要给大家带来mysql配置文件参数简析,这里所讲到的知识,与书籍略有不同,都是创新互联专业技术人员在与用户接触过程中,总结出来的,具有一定的经验分享价值,希望给广大读者带来帮助。
让客户满意是我们工作的目标,不断超越客户的期望值来自于我们对这个行业的热爱。我们立志把好的技术通过有效、简单的方式提供给客户,将通过不懈努力成为客户在信息化领域值得信任、有价值的长期合作伙伴,公司提供的服务项目有:域名注册、虚拟空间、营销软件、网站建设、平湖网站维护、网站推广。今晚要创建十几套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
# 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配置文件参数简析,如果大家还有更多需要了解的可以持续关注我们创新互联的行业推新,如需获取专业解答,可在官网联系售前售后的,希望该文章可给大家带来一定的知识更新。
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
本文名称:mysql配置文件参数简析-创新互联
本文URL:http://hbruida.cn/article/csicci.html