install_mysql.sh:change default values for 'my.cnf'.

This commit is contained in:
Christoph 2018-12-11 03:51:08 +01:00
parent d24ee1515d
commit 7978ed6d0a

View File

@ -3002,6 +3002,7 @@ innodb-file-per-table = 1
## - ## -
#innodb-buffer-pool-size = 384M #innodb-buffer-pool-size = 384M
#innodb-buffer-pool-size = 1024M #innodb-buffer-pool-size = 1024M
innodb_buffer_pool_size = 1G
## - innodb_additional_mem_pool_size ## - innodb_additional_mem_pool_size
@ -3015,6 +3016,8 @@ innodb-file-per-table = 1
## - innodb_additional_mem_pool_size is deprected since version 5.6.3 ## - innodb_additional_mem_pool_size is deprected since version 5.6.3
## - innodb_additional_mem_pool_size is removed since version 5.7 ## - innodb_additional_mem_pool_size is removed since version 5.7
## - ## -
## - innodb_additional_mem_pool_size is also removed on MariaDB 10.3.x
## -
#innodb-additional-mem_pool-size = 20M #innodb-additional-mem_pool-size = 20M
#innodb-additional-mem_pool-size = 40M #innodb-additional-mem_pool-size = 40M
@ -3103,7 +3106,8 @@ innodb-file-per-table = 1
## - ## -
## - Default: 2097152 (2M) ## - Default: 2097152 (2M)
## - ## -
sort-buffer-size = 2M #sort-buffer-size = 2M
sort-buffer-size = 8M
## - key_buffer_size ## - key_buffer_size
@ -3127,7 +3131,8 @@ key-buffer-size = 384M
## - ## -
## - Default: 131072 (128K) ## - Default: 131072 (128K)
## - ## -
read-buffer-size = 2M #read-buffer-size = 2M
read-buffer-size = 8M
## - read_rnd_buffer_size ## - read_rnd_buffer_size
## - ## -
@ -3136,7 +3141,8 @@ read-buffer-size = 2M
## - ## -
## - Default: 262144 (256K) ## - Default: 262144 (256K)
## - ## -
read-rnd-buffer-size = 8M #read-rnd-buffer-size = 8M
read-rnd-buffer-size = 32M
## - myisam_sort_buffer_size ## - myisam_sort_buffer_size
@ -3172,7 +3178,8 @@ max-allowed-packet = 32M
## - closed and reopened), then you should increase the value of the ## - closed and reopened), then you should increase the value of the
## - table_open_cache variable. ## - table_open_cache variable.
## - ## -
table-open-cache = 512 #table-open-cache = 512
table-open-cache = 8192
## - table_definition_cache ## - table_definition_cache
## - ## -
@ -3210,7 +3217,7 @@ max-connect-errors = 999999
## - ## -
## - Default: 8 + (max_connections / 100) (5.6.8) , 0 (before) ## - Default: 8 + (max_connections / 100) (5.6.8) , 0 (before)
## - ## -
thread-cache-size = 8 #thread-cache-size = 8
## - thread_stack ## - thread_stack
## - ## -
@ -3301,6 +3308,7 @@ log-error = $_mysql_error_log
## - SELECT SQL_NO_CACHE beginnen. ## - SELECT SQL_NO_CACHE beginnen.
## - 2 : speichert nur diejenigen Anweisungen im Cache, ## - 2 : speichert nur diejenigen Anweisungen im Cache,
## - die mit SELECT SQL_CACHE beginnen. ## - die mit SELECT SQL_CACHE beginnen.
## -
" >> ${logdir}/main.log " >> ${logdir}/main.log
if [[ "$MYSQL_MAJOR_VERSION" -gt 8 ]] \ if [[ "$MYSQL_MAJOR_VERSION" -gt 8 ]] \
@ -3308,7 +3316,6 @@ log-error = $_mysql_error_log
|| ( [[ "$MYSQL_MAJOR_VERSION" -eq 8 ]] && [[ "$MYSQL_MINOR_VERSION" -eq 0 ]] \ || ( [[ "$MYSQL_MAJOR_VERSION" -eq 8 ]] && [[ "$MYSQL_MINOR_VERSION" -eq 0 ]] \
&& [[ $MYSQL_PATCH_LEVEL -ge 3 ]] ); then && [[ $MYSQL_PATCH_LEVEL -ge 3 ]] ); then
echo " echo "
## - die mit SELECT SQL_CACHE beginnen.
## - Removed since Version 8.0.3 ## - Removed since Version 8.0.3
## - ## -
#query_cache_type = 1" >> ${logdir}/main.log #query_cache_type = 1" >> ${logdir}/main.log
@ -3333,7 +3340,6 @@ log-error = $_mysql_error_log
|| ( [[ "$MYSQL_MAJOR_VERSION" -eq 8 ]] && [[ "$MYSQL_MINOR_VERSION" -eq 0 ]] \ || ( [[ "$MYSQL_MAJOR_VERSION" -eq 8 ]] && [[ "$MYSQL_MINOR_VERSION" -eq 0 ]] \
&& [[ $MYSQL_PATCH_LEVEL -ge 3 ]] ); then && [[ $MYSQL_PATCH_LEVEL -ge 3 ]] ); then
echo " echo "
## - die mit SELECT SQL_CACHE beginnen.
## - Removed since Version 8.0.3 ## - Removed since Version 8.0.3
## - ## -
#query-cache-limit = 4M" >> ${logdir}/main.log #query-cache-limit = 4M" >> ${logdir}/main.log
@ -3404,7 +3410,8 @@ log-error = $_mysql_error_log
else else
echo "#query-cache-size = 32M echo "#query-cache-size = 32M
#query-cache-size = 128M" >> ${logdir}/main.log #query-cache-size = 128M
query_cache_size = 1024M" >> ${logdir}/main.log
fi fi
echo " echo "
@ -3480,6 +3487,9 @@ log-queries-not-using-indexes = 0
## - Vorgabewert ist 128K ## - Vorgabewert ist 128K
## - ## -
#join-buffer-size = 384K #join-buffer-size = 384K
#join_buffer_size = 768K
join_buffer_size = 1024K
#join_buffer_size = 1536K
@ -3494,6 +3504,10 @@ log-queries-not-using-indexes = 0
## - Vorgabewert ist 16Mbyte ## - Vorgabewert ist 16Mbyte
## - ## -
#max-heap-table-size = 96M #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 ## - tmp_table_size
@ -3510,6 +3524,9 @@ log-queries-not-using-indexes = 0
## - Effective in-memory tmp_table_size is limited to max_heap_table_size. ## - Effective in-memory tmp_table_size is limited to max_heap_table_size.
## - ## -
#tmp-table-size = 96M #tmp-table-size = 96M
tmp_table_size = 768M
#tmp_table_size = 1024M
#tmp_table_size = 2048M
## - angepasste Einstellungen ## - angepasste Einstellungen
@ -3915,7 +3932,7 @@ innodb-file-per-table = 1
## - ## -
#innodb-log-group-home-dir = /var/lib/mysql/ #innodb-log-group-home-dir = /var/lib/mysql/
## - innodb-buffer-pool-size ## - innodb_buffer_pool_size
## - ## -
## - The size in bytes of the buffer pool, the memory area where InnoDB ## - The size in bytes of the buffer pool, the memory area where InnoDB
## - caches table and index data. ## - caches table and index data.
@ -3932,6 +3949,7 @@ innodb-file-per-table = 1
## - ## -
#innodb-buffer-pool-size = 384M #innodb-buffer-pool-size = 384M
#innodb-buffer-pool-size = 1024M #innodb-buffer-pool-size = 1024M
innodb_buffer_pool_size = 1G
## - innodb_additional_mem_pool_size ## - innodb_additional_mem_pool_size
@ -3945,6 +3963,8 @@ innodb-file-per-table = 1
## - innodb_additional_mem_pool_size is deprected since version 5.6.3 ## - innodb_additional_mem_pool_size is deprected since version 5.6.3
## - innodb_additional_mem_pool_size is removed since version 5.7 ## - innodb_additional_mem_pool_size is removed since version 5.7
## - ## -
## - innodb_additional_mem_pool_size is also removed on MariaDB 10.3.x
## -
#innodb-additional-mem-pool-size = 20M #innodb-additional-mem-pool-size = 20M
#innodb-additional-mem-pool-size = 40M #innodb-additional-mem-pool-size = 40M
@ -4033,7 +4053,8 @@ innodb-file-per-table = 1
## - ## -
## - Default: 2097152 (2M) ## - Default: 2097152 (2M)
## - ## -
sort-buffer-size = 2M #sort-buffer-size = 2M
sort-buffer-size = 8M
## - key_buffer_size ## - key_buffer_size
@ -4057,7 +4078,9 @@ key-buffer-size = 384M
## - ## -
## - Default: 131072 (128K) ## - Default: 131072 (128K)
## - ## -
read-buffer-size = 2M #read-buffer-size = 2M
read-buffer-size = 8M
## - read_rnd_buffer_size ## - read_rnd_buffer_size
## - ## -
@ -4066,7 +4089,8 @@ read-buffer-size = 2M
## - ## -
## - Default: 262144 (256K) ## - Default: 262144 (256K)
## - ## -
read-rnd-buffer-size = 8M #read-rnd-buffer-size = 8M
read-rnd-buffer-size = 32M
## - myisam_sort_buffer_size ## - myisam_sort_buffer_size
@ -4102,7 +4126,8 @@ max-allowed-packet = 32M
## - closed and reopened), then you should increase the value of the ## - closed and reopened), then you should increase the value of the
## - table_open_cache variable. ## - table_open_cache variable.
## - ## -
table-open-cache = 512 #table-open-cache = 512
table-open-cache = 8192
## - table_definition_cache ## - table_definition_cache
## - ## -
@ -4140,7 +4165,7 @@ max-connect-errors = 999999
## - ## -
## - Default: 8 + (max_connections / 100) (5.6.8) , 0 (before) ## - Default: 8 + (max_connections / 100) (5.6.8) , 0 (before)
## - ## -
thread-cache-size = 8 #thread-cache-size = 8
## - thread_stack ## - thread_stack
## - ## -
@ -4266,7 +4291,6 @@ EOF
&& [[ $MYSQL_PATCH_LEVEL -ge 3 ]] ); then && [[ $MYSQL_PATCH_LEVEL -ge 3 ]] ); then
cat << EOF >> ${MYSQL_INSTALL_DIR}/etc/my.cnf cat << EOF >> ${MYSQL_INSTALL_DIR}/etc/my.cnf
## -
## - Removed since MySQL Version 8.0.3 ## - Removed since MySQL Version 8.0.3
## - ## -
#query-cache-limit = 4M #query-cache-limit = 4M
@ -4343,7 +4367,9 @@ EOF
EOF EOF
else else
cat << EOF >> ${MYSQL_INSTALL_DIR}/etc/my.cnf cat << EOF >> ${MYSQL_INSTALL_DIR}/etc/my.cnf
query-cache-size = 128M #query_cache_size = 32M
#query-cache-size = 128M
query-cache-size = 1024M
EOF EOF
fi fi
@ -4420,6 +4446,9 @@ log-queries-not-using-indexes = 0
## - Vorgabewert ist 128K ## - Vorgabewert ist 128K
## - ## -
#join-buffer-size = 384K #join-buffer-size = 384K
join_buffer_size = 768K
#join_buffer_size = 1024K
#join_buffer_size = 1536K
@ -4434,6 +4463,10 @@ log-queries-not-using-indexes = 0
## - Vorgabewert ist 16Mbyte ## - Vorgabewert ist 16Mbyte
## - ## -
#max-heap-table-size = 96M #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 ## - tmp_table_size
@ -4450,6 +4483,9 @@ log-queries-not-using-indexes = 0
## - Effective in-memory tmp_table_size is limited to max_heap_table_size. ## - Effective in-memory tmp_table_size is limited to max_heap_table_size.
## - ## -
#tmp-table-size = 96M #tmp-table-size = 96M
tmp_table_size = 768M
#tmp_table_size = 1024M
#tmp_table_size = 2048M
## - angepasste Einstellungen ## - angepasste Einstellungen