MySQL Connection Issues Using Tutor for Open edX

**Description of the Problem:

I encountered several difficulties using Tutor to deploy Open edX on Kubernetes. The specific issues are as follows:

  • Unable to connect MySQL with the CMS and LMS containers.
  • MySQL connection errors for openedx and root users.

Steps to Reproduce:

  1. Initialized Tutor with tutor local quickstart (succeeded without errors).
  2. Deployed Open edX on Kubernetes with tutor k8s start.
  3. While executing tutor k8s init, I received the following error:
    Error: Job mysql-job-20240806152831 failed. View the job logs to debug this issue.
  4. Attempted to connect to MySQL from the CMS and LMS containers as well as SQL:
    kubectl exec -it -n openedx pod/mysql-5db88664b4-blztv – bash
    mysql -u openedx --port 33060 -p
  5. The response was:
    ERROR 1045 (28000): Access denied for user ‘openedx’@‘localhost’ (using password: YES)
    Note: The password used was the one specified in the environment variables via tutor config printroot /env
    6.The connection attempt always results in the following error:
    ERROR 1045 (28000): Access denied for user ‘openedx’@‘localhost’ (using password: YES)
    Attempted to connect as root:
    mysql -u root -p
    6.*The specified password does not work either.
    MySQL Job Logs:
    2024-08-06 13:50:42+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
    2024-08-06 13:50:42+00:00 [Note] [Entrypoint]: Switching to dedicated user ‘mysql’
    2024-08-06 13:50:42+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.4.0-1.el9 started.
    2024-08-06 13:50:42+00:00 [ERROR] [Entrypoint]: Database is uninitialized and password option is not specified
    You need to specify one of the following as an environment variable:
  • MYSQL_ROOT_PASSWORD
  • MYSQL_ALLOW_EMPTY_PASSWORD
  • MYSQL_RANDOM_ROOT_PASSWORD