【MySQL】my.cnf 配置檔案
記錄一份 my.cnf 作為自己生產的標配, 僅供參考。
-
[client]
-
default-character-set = utf8mb4
-
port = PORT
-
socket = /srv/myPORT/run/mysql.sock
-
-
[mysqld]
-
user = mysql
-
port = PORT
-
extra-port = 1PORT
-
character_set_server = utf8mb4
-
server_id = SERVER_ID
-
socket = /srv/myPORT/run/mysql.sock
-
basedir = /opt/percona-server
-
datadir = /srv/myPORT/data
-
log-error = /srv/myPORT/log/alert.log
-
pid-file = /srv/myPORT/run/mysql.pid
-
log_slave_updates = 1
-
log-bin = /srv/myPORT/log/mysql-bin
-
binlog_format = row
-
binlog_cache_size = 2M
-
max_binlog_cache_size = 4G
-
max_binlog_size = 1G
-
expire_logs_days = 7
-
relay-log = /srv/myPORT/log/relay-bin
-
relay-log-info-file = /srv/myPORT/log/relay-log.info
-
relay-log-index = /srv/myPORT/log/relay-log.index
-
master-info-file = /srv/myPORT/log/master.info
-
relay-log-recovery = true
-
sync-relay-log-info = 1
-
explicit_defaults_for_timestamp
-
key_buffer_size = 2M
-
sort_buffer_size = 2M
-
read_buffer_size = 2M
-
read_rnd_buffer_size = 16M
-
join_buffer_size = 2M
-
thread_cache_size = 1024
-
query_cache_size = 1M
-
query_cache_limit = 1M
-
query_cache_min_res_unit = 2k
-
table_open_cache = 2048
-
open_files_limit = 65535
-
back_log = 3000
-
max_connections = 4000
-
max_user_connections = 2500
-
max_connect_errors = 100
-
max_allowed_packet = 512M
-
thread_stack = 192k
-
default-storage-engine = INNODB
-
transaction_isolation = READ-COMMITTED
-
tmp_table_size = 16M
-
max_heap_table_size = 64M
-
bulk_insert_buffer_size = 64M
-
long_query_time = 0.5
-
slow_query_log = on
-
slow_query_log_file = /srv/myPORT/log/slow.log
-
skip-name-resolve
-
innodb_buffer_pool_size = 10G
-
innodb_data_file_path = ibdata1:2G:autoextend
-
innodb_file_io_threads = 24
-
innodb_purge_threads = 12
-
innodb_read_io_threads = 24
-
innodb_write_io_threads = 24
-
innodb_thread_concurrency = 24
-
innodb_buffer_pool_instances = 8
-
innodb_flush_log_at_trx_commit= 1
-
innodb_log_buffer_size = 16M
-
innodb_log_file_size = 2G
-
innodb_log_files_in_group = 2
-
innodb_max_dirty_pages_pct = 75
-
innodb_lock_wait_timeout = 50
-
innodb_file_per_table = 1
-
thread_handling = pool-of-threads
-
thread_pool_idle_timeout = 180
-
thread_pool_max_threads = 5000
-
thread_pool_size = 24
-
thread_pool_oversubscribe = 10
-
thread_pool_stall_limit = 500
-
[mysqldump]
-
quick
-
max_allow_packet = 64M
-
[mysql]
-
no-auto-rehash
-
[mysqlhotcopy]
- interactive-timeout
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28686045/viewspace-2126254/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- mysql的配置檔案my.cnfMySql
- mysql5.7.26的my.cnf配置檔案MySql
- MySql5.7配置檔案my.cnf設定MySql
- 解析MySQL 配置檔案 my.cnf / my.ini 區別MySql
- MySQL-配置檔案my.cnf引數最佳化詳解MySql
- MySQL配置檔案MySql
- mysql 配置檔案MySql
- Centos-Mysql配置my.cnf內容CentOSMySql
- MySQL檔案my.ini配置MySql
- MySQL InnoDB日誌檔案配置MySql
- MySQL 配置檔案位置及命名。MySql
- Mysql 配置檔案 my.iniMySql
- 如何修復MySQL配置檔案?MySql
- Mysql關於my.cnf引數檔案的讀取順序及各項配置的覆蓋優先順序MySql
- MySQL配置檔案my.ini在哪MySql
- Mysql配置檔案my.ini配置項詳解MySql
- Mysql:mysql多例項建立、配置檔案講解【四】MySql
- Linux中MYSQL5.7預設配置my.cnf存放路徑LinuxMySql
- MySQL 配置檔案 (my.ini) 詳解MySql
- mysql之my.cnf詳解MySql
- my.cnf檔案關於組選項的總結
- MySQL的配置檔案的引數設定MySql
- 配置檔案讀取——MySQL 多個連線MySql
- MySQL-5.5.32 配置檔案優化詳解MySql優化
- Mysql資料庫配置檔案(my.ini)分析MySql資料庫
- Git配置配置檔案Git
- mysql的my.cnf解釋說明MySql
- Mysql my.cnf部分引數說明MySql
- MySql5.7配置檔案my.ini 設定 my.ini檔案路徑MySql
- MySQL InnoDB系統表空間資料檔案配置MySql
- 檔案解析,在mysql配置和檢查項一樣的專案MySql
- docker 配置檔案Docker
- gitignore 檔案配置Git
- Nginx 配置檔案Nginx
- Maven 配置檔案Maven
- Springboot配置檔案Spring Boot
- nginx配置檔案Nginx
- 【SpringBoot】配置檔案Spring Boot
- 配置檔案vimrc