Created
March 31, 2020 02:57
-
-
Save Linuxpizi/09bd96fa458daef3ac31c46cabfbf4d9 to your computer and use it in GitHub Desktop.
mysql配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[client] | |
port = 3306 | |
socket = /var/lib/mysql/mysql.sock | |
[mysql] | |
no-auto-rehash | |
[mysqld] | |
#Misc | |
server-id = 1 | |
user = mysql | |
port = 3306 | |
socket = /var/lib/mysql/mysql.sock | |
datadir = /data/mysql_data | |
ft_min_word_len=1 | |
# Disabling symbolic-links is recommended to prevent assorted security risks | |
symbolic-links=0 | |
#Performance | |
log-bin=mysql-bin | |
net_read_timeout = 6000 | |
net_write_timeout = 9000 | |
wait_timeout = 28800 | |
interactive_timeout = 28800 | |
open_files_limit = 10240 | |
back_log = 300 | |
max_connections = 5000 | |
max_connect_errors = 50 | |
external-locking = FALSE | |
performance_schema = 1 | |
#buffers & cache | |
table_definition_cache = 2048 | |
max_heap_table_size = 246M | |
tmp_table_size = 246M | |
sort_buffer_size = 2M | |
join_buffer_size = 2M | |
thread_cache_size = 256 | |
#thread_concurrency = 8 | |
query_cache_type = ON | |
query_cache_size = 32M | |
query_cache_limit = 2M | |
query_cache_min_res_unit = 2k | |
thread_stack = 192K | |
read_buffer_size = 1M | |
read_rnd_buffer_size = 16M | |
bulk_insert_buffer_size = 64M | |
#logs | |
#log-output=file | |
log-error=/data/mysql_log/error.log | |
log_warnings = 2 | |
slow-query-log | |
slow-query-log-file=/data/mysql_log/slow-log.log | |
long_query_time = 1 | |
#binlog & replication | |
binlog_row_image = full | |
binlog_format = row | |
binlog_cache_size = 4M | |
max_binlog_cache_size = 1G | |
max_binlog_size = 1G | |
expire_logs_days = 7 | |
relay-log-purge = 1 | |
sync_binlog = 1 | |
skip-slave-start = 1 | |
log-slave-updates = 1 | |
#Myisam engine | |
key_buffer_size = 1620M | |
myisam_sort_buffer_size = 128M | |
myisam_max_sort_file_size = 1G | |
myisam_repair_threads = 1 | |
myisam_recover | |
lower_case_table_names = 1 | |
skip-name-resolve | |
slave-skip-errors = 1032,1062 | |
#Innodb engine | |
innodb_additional_mem_pool_size = 1660M | |
innodb_buffer_pool_size = 25G | |
innodb_data_file_path = ibdata1:100M:autoextend | |
innodb_file_per_table = 1 | |
innodb_thread_concurrency = 0 | |
innodb_flush_log_at_trx_commit = 1 | |
innodb_log_buffer_size = 16M | |
innodb_log_file_size = 256M | |
innodb_log_files_in_group = 3 | |
innodb_max_dirty_pages_pct = 75 | |
innodb_lock_wait_timeout = 120 | |
innodb_rollback_on_timeout | |
innodb_status_file = 1 | |
innodb_io_capacity = 800 | |
transaction_isolation = READ-COMMITTED | |
innodb_flush_method = O_DIRECT | |
innodb-support-xa = 0 | |
innodb_read_io_threads = 8 | |
innodb_write_io_threads = 8 | |
innodb_file_format = Barracuda | |
[mysqldump] | |
quick | |
max_allowed_packet = 7132M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment