install_mysql.sh: adjust default 'my.cnf'-file.

This commit is contained in:
Christoph 2021-08-15 05:22:41 +02:00
parent 7d6a51fcc9
commit 15c516ee95

View File

@ -3199,8 +3199,8 @@ pid-file = ${SYSTEMD_PID_DIR}/mysqld.pid
## - character-set-server
## -
## - The servers default character set. If you set this variable, you should also
## - set collation_server to specify the collation for the character set.
## - The servers default character set. If you set this variable, you should also
## - set collation_server to specify the collation for the character set.
## -
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
## -
@ -3215,7 +3215,7 @@ pid-file = ${SYSTEMD_PID_DIR}/mysqld.pid
## - collation-server
## -
## - The server's default collation. See Section 10.14, “Character Set Configuration.
## - The server's default collation. See Section 10.14, “Character Set Configuration.
#collation-server = utf8_general_ci
" >> ${logdir}/main.log
@ -3530,6 +3530,7 @@ innodb-file-per-table = 1
## -
#innodb-buffer-pool-size = 384M
#innodb-buffer-pool-size = 1024M
innodb_buffer_pool_size = 4G
## - innodb_additional_mem_pool_size
@ -3571,6 +3572,7 @@ innodb-file-per-table = 1
## -
#innodb-log-file-size = 100M
#innodb-log-file-size = 256M
innodb_log_file_size = 512M
## - innodb_log_buffer_size
## -
@ -3605,6 +3607,8 @@ innodb-file-per-table = 1
## - DROP TABLE IF EXISTS..
## - ...
## -
## - Default: innodb-flush-log-at-trx-commit = 1
## -
#innodb-flush-log-at-trx-commit = 1
#innodb-flush-log-at-trx-commit = 2
@ -3642,7 +3646,8 @@ sort-buffer-size = 2M
## -
## - Default: 8388608 (8M)
## -
key-buffer-size = 384M
#key-buffer-size = 384M
key_buffer_size = 512M
## - read_buffer_size
@ -3698,7 +3703,10 @@ max-allowed-packet = 32M
## - closed and reopened), then you should increase the value of the
## - table_open_cache variable.
## -
table-open-cache = 512
#table-open-cache = 512
#table_open_cache = 1024
#table_open_cache = 6144
table_open_cache = 8192
## - table_definition_cache
## -
@ -3708,6 +3716,7 @@ table-open-cache = 512
## - Default: (400 + (table_open_cache / 2) since 5.6.8, 400 before
## -
#table-definition-cache = 1680
table_definition_cache = 5120
## - max-connect-errors
## -
@ -3736,7 +3745,8 @@ max-connect-errors = 999999
## -
## - Default: 8 + (max_connections / 100) (5.6.8) , 0 (before)
## -
thread-cache-size = 8
#thread-cache-size = 8
thread_cache_size = 32
## - thread_stack
## -
@ -3865,7 +3875,8 @@ log-error = $_mysql_error_log
#query-cache-limit = 4M" >> ${logdir}/main.log
else
echo "query-cache-limit = 4M" >> ${logdir}/main.log
echo "#query-cache-limit = 4M" >> ${logdir}/main.log
echo "query-cache-limit = 16M" >> ${logdir}/main.log
fi
echo "
@ -3929,8 +3940,9 @@ log-error = $_mysql_error_log
#query-cache-size = 128M" >> ${logdir}/main.log
else
echo "#query-cache-size = 32M
#query-cache-size = 128M" >> ${logdir}/main.log
echo "#query-cache-size = 128M
#query-cache-size = 512M
query-cache-size = 1024M" >> ${logdir}/main.log
fi
echo "
@ -4006,6 +4018,9 @@ log-queries-not-using-indexes = 0
## - Vorgabewert ist 128K
## -
#join-buffer-size = 384K
#join_buffer_size = 768K
#join_buffer_size = 1024K
join_buffer_size = 1536K
@ -4020,6 +4035,10 @@ log-queries-not-using-indexes = 0
## - Vorgabewert ist 16Mbyte
## -
#max-heap-table-size = 96M
#max_heap_table_size = 128M
#max_heap_table_size = 768M
#max_heap_table_size = 1024M
max_heap_table_size = 2048M
## - tmp_table_size
@ -4036,6 +4055,8 @@ log-queries-not-using-indexes = 0
## - Effective in-memory tmp_table_size is limited to max_heap_table_size.
## -
#tmp-table-size = 96M
#tmp_table_size = 768M
tmp_table_size = 2048M
# This group is only read by MariaDB servers, not by MySQL.
@ -4095,7 +4116,7 @@ query_cache_type = 0
## - But present at MariaDB
## -
#query-cache-limit = 4M
query_cache_limit = 128M
query-cache-limit = 16M
## - query_cache_min_res_unit
@ -4138,7 +4159,9 @@ query_cache_limit = 128M
## -
## - But present at MariaDB
## -
query_cache_size = 128M
#query_cache_size = 128M
#query_cache_size = 512M
query_cache_size = 1024M
## - query cache
## -------------
@ -4291,8 +4314,8 @@ EOF
## - character-set-server
## -
## - The servers default character set. If you set this variable, you should also
## - set collation_server to specify the collation for the character set.
## - The servers default character set. If you set this variable, you should also
## - set collation_server to specify the collation for the character set.
## -
## - See also: https://dev.mysql.com/doc/refman/8.0/en/charset-configuration.html
## -
@ -4307,7 +4330,7 @@ EOF
## - collation-server
## -
## - The server's default collation. See Section 10.14, “Character Set Configuration.
## - The server's default collation. See Section 10.14, “Character Set Configuration.
#collation-server = utf8_general_ci
EOF
@ -4611,6 +4634,7 @@ innodb-file-per-table = 1
## -
#innodb-buffer-pool-size = 384M
#innodb-buffer-pool-size = 1024M
innodb_buffer_pool_size = 4G
## - innodb_additional_mem_pool_size
@ -4654,6 +4678,7 @@ innodb-file-per-table = 1
## -
#innodb-log-file-size = 100M
#innodb-log-file-size = 256M
innodb_log_file_size = 512M
## - innodb_log_buffer_size
## -
@ -4686,6 +4711,8 @@ innodb-file-per-table = 1
## - SET AUTOCOMMIT=0;
## -
## - DROP TABLE IF EXISTS..
## -
## - Default: innodb-flush-log-at-trx-commit = 1
## - ...
## -
#innodb-flush-log-at-trx-commit = 1
@ -4725,7 +4752,8 @@ sort-buffer-size = 2M
## -
## - Default: 8388608 (8M)
## -
key-buffer-size = 384M
#key-buffer-size = 384M
key_buffer_size = 512M
## - read_buffer_size
@ -4781,7 +4809,10 @@ max-allowed-packet = 32M
## - closed and reopened), then you should increase the value of the
## - table_open_cache variable.
## -
table-open-cache = 512
#table-open-cache = 512
#table_open_cache = 1024
#table_open_cache = 6144
table_open_cache = 8192
## - table_definition_cache
## -
@ -4791,6 +4822,7 @@ table-open-cache = 512
## - Default: (400 + (table_open_cache / 2) since 5.6.8, 400 before
## -
#table-definition-cache = 1680
table_definition_cache = 5120
## - max_connect_errors
## -
@ -4819,7 +4851,8 @@ max-connect-errors = 999999
## -
## - Default: 8 + (max_connections / 100) (5.6.8) , 0 (before)
## -
thread-cache-size = 8
#thread-cache-size = 8
thread_cache_size = 32
## - thread_stack
## -
@ -4952,7 +4985,8 @@ EOF
EOF
else
cat << EOF >> ${MYSQL_INSTALL_DIR}/etc/my.cnf
query-cache-limit = 4M
#query-cache-limit = 4M
query_cache_limit = 16M
EOF
fi
@ -5017,12 +5051,15 @@ EOF
## -
## - Removed since MySQL Version 8.0.3
## -
#query_cache_size = 32M
#query-cache-size = 128M
#query_cache_size = 512M
#query_cache_size = 1024M
EOF
else
cat << EOF >> ${MYSQL_INSTALL_DIR}/etc/my.cnf
query-cache-size = 128M
#query-cache-size = 128M
#query_cache_size = 512M
query_cache_size = 1024M
EOF
fi
@ -5099,6 +5136,9 @@ log-queries-not-using-indexes = 0
## - Vorgabewert ist 128K
## -
#join-buffer-size = 384K
#join_buffer_size = 768K
#join_buffer_size = 1024K
join_buffer_size = 1536K
@ -5113,6 +5153,10 @@ log-queries-not-using-indexes = 0
## - Vorgabewert ist 16Mbyte
## -
#max-heap-table-size = 96M
#max_heap_table_size = 128M
#max_heap_table_size = 768M
#max_heap_table_size = 1024M
max_heap_table_size = 2048M
## - tmp_table_size
@ -5129,6 +5173,8 @@ log-queries-not-using-indexes = 0
## - Effective in-memory tmp_table_size is limited to max_heap_table_size.
## -
#tmp-table-size = 96M
#tmp_table_size = 768M
tmp_table_size = 2048M