Skip to content

Instantly share code, notes, and snippets.

@binbin666
Last active February 8, 2022 09:13
Show Gist options
  • Save binbin666/4c7e9de367c126c9b7185adb65d00593 to your computer and use it in GitHub Desktop.
Save binbin666/4c7e9de367c126c9b7185adb65d00593 to your computer and use it in GitHub Desktop.
## mySQL config file for ram 8GB
[mysqld]
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
datadir = /var/lib/mysql
secure-file-priv= NULL
# cd mo start
symbolic-links=0
max_connections=600
binlog_expire_logs_seconds=259200
innodb_page_cleaners=16
sync_binlog=500
innodb_flush_log_at_trx_commit=2
innodb_buffer_pool_size=4G
innodb_buffer_pool_instances=8
innodb_write_io_threads=8
# ext size
binlog_cache_size = 2M
max_heap_table_size = 384M
thread_cache_size = 8
join_buffer_size = 16M
sort_buffer_size = 8M
key_buffer_size = 256M
read_buffer_size = 6M
read_rnd_buffer_size = 16M
thread_stack = 192K
tmp_table_size = 384M
# cd mo end
# Custom config should go here
!includedir /etc/mysql/conf.d/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment