Game Of Pods Drupal mysql User Error

When deploying the mysql db for the drupal exercise the secret: MYSQL_USER=root no longer works. Below is the error from the logs on the mysql pod.

controlplane $ kubectl logs pod/drupal-mysql-545f4889b8-cf62k
2021-09-08 00:18:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.35-1debian10 started.
2021-09-08 00:18:24+00:00 [Note] [Entrypoint]: Switching to dedicated user ‘mysql’
2021-09-08 00:18:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 5.7.35-1debian10 started.
2021-09-08 00:18:24+00:00 [ERROR] [Entrypoint]: MYSQL_USER=“root”, MYSQL_USER and MYSQL_PASSWORD are for configuring a regular user and cannot be used for the root user
Remove MYSQL_USER=“root” and use one of the following to control the root user password:
- MYSQL_ROOT_PASSWORD
- MYSQL_ALLOW_EMPTY_PASSWORD
- MYSQL_RANDOM_ROOT_PASSWORD

When I delete out MYSQL_USER from the deployment env references it works. However, the “Quiz Portal” UI will not show it as completed because it is looking for those values.

You need to delete out the requirement for a MYSQL_USER=ROOT for the exercise.

Or you may rather omit this variable from being included from Secret into the Spec. :slight_smile:
The exercise does’t mandate including it.

If we remove the MYSQL_USER env from drupal-mysql deploy, then mysql pod starts running. But when we click Check button, it shows task incomplete.

How to get magic chant, if this shows as task incomplete.
Please fix this issue.

1st deploy it without “MYSQL_USER” env. Once your POD started…you include the “MYSQL_USER” in YAML file and apply it …it will work

2 Likes

Thanks @satya12sahoo
That tip worked.

Was this designed this way deliberately?

Hi @gvamsius

  1. I am a subscriber like you in kodekloud. So I am not aware about their architecture.

  2. It’s all about your POD should take the env to their container and should be running.

FYI since mysql:5.7.32 you may no longer pass in MYSQL_USER=root

Please check out our updated solution: -

Regards,
KodeKloud Support