Closed greggbjensen closed 4 years ago
I was able to get it to work, without any warnings, if I removed all character set lines from the master.config:
fullnameOverride: test-mysql
root:
password: someRootPass
db:
name: mydatabase
user: myuser
password: myDataPass
replication:
enabled: false
master:
config: |-
[mysqld]
default_authentication_plugin=mysql_native_password
skip-name-resolve
explicit_defaults_for_timestamp
basedir=/opt/bitnami/mysql
plugin_dir=/opt/bitnami/mysql/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=0.0.0.0
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
log-error=/opt/bitnami/mysql/logs/mysqld.log
[client]
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
plugin_dir=/opt/bitnami/mysql/plugin
[manager]
port=3306
socket=/opt/bitnami/mysql/tmp/mysql.sock
Hi @greggbjensen, you can use the value image.debug=true
to get more information about what is going on. Adding the following lines to your mysql.yaml
file showed what is causing the issue:
image:
debug: true
$ kubectl logs -f test-mysql-master-0
...
mysql 11:25:41.46 INFO ==> Installing database
2020-07-07T11:25:41.469443Z 0 [System] [MY-013169] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.0.20) initializing of server in progress as process 33
2020-07-07T11:25:41.470239Z 0 [ERROR] [MY-010933] [Server] Unknown collation: 'UTF8MB4'.
Then I checked Supported Character Sets and Collations. Executing the SHOW CHARACTER SET;
in a working deployment (without a custom values file):
ROOT_PASSWORD=$(kubectl get secret --namespace default mysql -o jsonpath="{.data.mysql-root-password}" | base64 --decode)
kubectl exec -it mysql-master-0 -- mysql -uroot -p${ROOT_PASSWORD} -e 'SHOW CHARACTER SET;'
+----------+---------------------------------+---------------------+--------+
| Charset | Description | Default collation | Maxlen |
+----------+---------------------------------+---------------------+--------+
...
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
| utf8mb4 | UTF-8 Unicode | utf8mb4_0900_ai_ci | 4 |
+----------+---------------------------------+---------------------+--------+
So it seems the collation doesn't have the same format than the charset. Changing that in your mysql.yaml
file made the trick:
pid-file=/opt/bitnami/mysql/tmp/mysqld.pid
log-error=/opt/bitnami/mysql/logs/mysqld.log
character-set-server=UTF8MB4
- collation-server=UTF8MB4
+ collation-server=utf8mb4_0900_ai_ci
[client]
port=3306
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
Which chart: mysql v6.14.4
Describe the bug When I start the container I get warning messages about UTF8MB4. If I set
master.config
to UTF8MB4 the container fails to start.I am using Pimcore which requires UTF8MB4, so I explicitly set the
master.config
to UTF8MB4:Now the container fails with no messages after
Installing database
:To Reproduce Steps to reproduce the behavior:
Create a
mysql.yaml
values file with a database to be created and the master.config:Install the helm chart with the
mysql.yaml
as values:The container will start in Kubernetes and get to
Creating database
then the container will restart with no other messages.Expected behavior Database is created with UTF8MB4 encoding.
Version of Helm and Kubernetes:
helm version
:kubectl version
: