Score:0

How to set individual mysqld parameters using the bitnami/mysql Helm chart?

vn flag

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?

ua flag
Maybe it allows a second config file? It would need 2 lines: `[mysqld]` and `max_allowed_packet=64M`.
BenMorel avatar
vn flag
@RickJames Not as far as a I can see I'm afraid!
Wilson Hauck avatar
jp flag
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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.