0

We're using the bitnami/mysql Helm chart.

We'd like to upgrade max_allowed_packet from the default 16M value to 64M.

From what I can read in the README, it looks like the only way to pass custom [mysqld] parameters is by overriding the primary.configuration value.

But the default value is quite big:

$ helm show values bitnami/mysql
...
primary:
  ...
  configuration: |-
    [mysqld]
    default_authentication_plugin=mysql_native_password
    skip-name-resolve
    explicit_defaults_for_timestamp
    basedir=/opt/bitnami/mysql
    plugin_dir=/opt/bitnami/mysql/lib/plugin
    port=3306
    socket=/opt/bitnami/mysql/tmp/mysql.sock
    datadir=/bitnami/mysql/data
    tmpdir=/opt/bitnami/mysql/tmp
    max_allowed_packet=16M
    bind-address=*
    pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
    log-error=/opt/bitnami/mysql/logs/mysqld.log
    character-set-server=UTF8
    collation-server=utf8_general_ci
    slow_query_log=0
    slow_query_log_file=/opt/bitnami/mysql/logs/mysqld.log
    long_query_time=10.0

    [client]
    port=3306
    socket=/opt/bitnami/mysql/tmp/mysql.sock
    default-character-set=UTF8
    plugin_dir=/opt/bitnami/mysql/lib/plugin

    [manager]
    port=3306
    socket=/opt/bitnami/mysql/tmp/mysql.sock
    pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
...

So I would have to copy/paste this whole config block, just to modify one line.

Is there a better way to modify just one [mysqld] configuration value?

BenMorel
  • 4,507
  • 10
  • 57
  • 85
  • Maybe it allows a second config file? It would need 2 lines: `[mysqld]` and `max_allowed_packet=64M`. – Rick James May 03 '23 at 23:19
  • @RickJames Not as far as a I can see I'm afraid! – BenMorel May 04 '23 at 08:35
  • Can you backup your bitnami/mysql and edit the file directly for the line to be changed then save it? Stop/Start the instance and you will be done. Some people are successful with cd bitnami then cp mysql 202305042014mysql to have a last running backup. You may find the filename is actually mysql.cnf or mysql.ini be careful. – Wilson Hauck May 05 '23 at 01:13

0 Answers0