YetiForceCompany/YetiForceCRM

View on GitHub
tests/setup/db/mysql.cnf

Summary

Maintainability
Test Coverage
##############################################
#  Best configuration for YetiForceCRM       #
#  Created by m.krzaczkowski@yetiforce.com   #
##############################################
[client]
default-character-set             = utf8

[mysql]
default-character-set             = utf8

[mysqld]
user                               = mysql
pid-file                            = /run/mysqld/mysqld.pid
socket                              = /run/mysqld/mysqld.sock
basedir                            = /usr
datadir                            = /var/lib/mysql
tmpdir                            = /tmp
lc-messages-dir                     = /usr/share/mysql
bind-address                    = 0.0.0.0
log_error                         = /var/log/mysql/error.log
expire_logs_days                    = 10

default_storage_engine            = InnoDB
character-set-server             = utf8
collation-server                 = utf8_general_ci
init-connect                     = 'SET NAMES utf8'
sql-mode                        = "ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
wait_timeout                    = 600
connect_timeout                    = 600
net_read_timeout                = 600
net_write_timeout                = 600
interactive_timeout                = 600
max_allowed_packet                = 128M
query_cache_size                    = 128M
innodb_lock_wait_timeout        = 600
innodb_large_prefix             = ON
innodb_file_per_table             = ON
innodb_ft_min_token_size        = 2
innodb_stats_on_metadata        = OFF
innodb_open_files                = 1000
innodb_io_capacity                = 1000
ft_min_word_len                 = 2
innodb_default_row_format        = 'dynamic'
table_open_cache                = 1000
table_definition_cache            = 1400
bulk_insert_buffer_size    = 16M

sort_buffer_size                = 4M
read_buffer_size                = 2M
read_rnd_buffer_size            = 1M
join_buffer_size                 = 16M
max_connections                    = 100
innodb_flush_method                = O_DIRECT

# key_buffer_size                 = 256M
# key_buffer                     = 512M
# tmp_table_size                = 1024M
# myisam_sort_buffer_size         = 512M
# max_heap_table_size            = 1024M
# innodb_buffer_pool_size         = 2G        # best min 1 GB, approximately 70 – 80% of the RAM available.
# innodb_buffer_pool_instances     = 2         # or 1 if innodb_buffer_pool_size < 1GB
# innodb_log_file_size             = 512M         # best 25% innodb_buffer_pool_size   https://haydenjames.io/mysql-server-has-gone-away-error-solutions/
# innodb_additional_mem_pool_size = 1024M
# innodb_log_buffer_size         = 256M