Hi,

When running mysql with other containers within one pod, it seemed that 
environment variable "MYSQL_ROOT_PASSWORD" didn't work as expected.

Password set in "MYSQL_ROOT_PASSWORD" couldn't be used for connecting to mysql.

But empty password works.

If only running mysql in pod, the variable works fine.


How could I fix the problem?


Detailed deployment file is as below,

    spec:
      containers:
      - name: ocai
        image: aura/web:develop
        imagePullPolicy: Always
        ports:
        - containerPort: 9000
      - name: notebook
        image: aura/all-spark-notebook:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 8889
        command: ["sh", "-c", "jupyter-notebook --port=8889 
--NotebookApp.token='9e4f96c5239743a8dd5910216c6f02dad89a58932d63db7f' 
--config=/jupyter_notebook_config.py --no-browser"]
        volumeMounts:
            - mountPath: /data/ai_lab/ocai/
              name: nb-data
        resources:
          requests:
            memory: 4Gi
      - name: mysql
        env:
          - name: MYSQL_ROOT_PASSWORD
            value: Ocai@1234
        image: aura/mysql:5.7
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 3306
        volumeMounts:
            - mountPath: "/var/lib/mysql"
              name: mysql-data
        resources:
          requests:
            memory: 2G
      volumes:
        - name: mysql-data
          persistentVolumeClaim:
            claimName: ocai-mysql-claim
        - name: nb-data
          persistentVolumeClaim:
            claimName: ocai-nb-claim





Thanks,

Jared, (韦煜)
Software developer
Interested in open source software, big data, Linux
_______________________________________________
users mailing list
users@lists.openshift.redhat.com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to