radondb-mysql-kubernetes
radondb-mysql-kubernetes copied to clipboard
[feature] Support dynamic update MySQL configuration.
Is your feature request related to a problem? Please describe.
Only some parameters must be restarted to take effect.
"default-storage-engine": "InnoDB",
"back_log": "2048",
"ft_min_word_len": "4",
"lower_case_table_names": "0",
"innodb_ft_max_token_size": "84",
"innodb_ft_min_token_size": "3",
"sql_mode": "STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION",
"slave_parallel_workers": "8",
"slave_pending_jobs_size_max": "1073741824",
"innodb_log_buffer_size": "16777216",
"innodb_log_file_size": "1073741824",
"innodb_log_files_in_group": "2",
"innodb_flush_method": "O_DIRECT",
"innodb_use_native_aio": "1",
"innodb_autoinc_lock_mode": "2",
"performance_schema": "1",
Describe the solution you'd like
Describe alternatives you've considered
Additional context
- How to load custom
my.cnfto our cluster
For example:
we have a my.cnf like this
[mysqld]
back_log=-1
big_tables=0
binlog_cache_size=1M
binlog_checksum=NONE
binlog_format=ROW
binlog_row_event_max_size=8192
binlog_row_image=FULL
we can use bellow script to load to our cr:
kubectl patch mysql sample --type=merge --patch "$(jq -sR '{"spec":
{"mysqlOpts":
{"mysqlConf": [split("\n")[:-1][] | split("=") | {(.[0]): .[1]}]| add
}
}
}' < <(grep ^[a-z] my.cnf))"