title: Mysql container not starting up on Kubernetes
body: <p>I was using <a href="https://hub.docker.com/layers/bitnami/mysql/5.7/images/sha256-87d11d41343c5404073f13b555e2849db4cb975f10e9b84ff4054242f1f7dade?context=explore" rel="nofollow noreferrer">this</a> image to run my application in <code>docker-compose</code>. However, when I run the same on a Kubernetes cluster I get the error </p>
  
  <pre><code>[ERROR] Could not open file '/opt/bitnami/mysql/logs/mysqld.log' for error logging: Permission denied
  </code></pre>
  
  <p>Here's my deployment file </p>
  
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    annotations:
      kompose.cmd: kompose convert
      kompose.version: 1.21.0 ()
    creationTimestamp: null
    labels:
      io.kompose.service: common-db
    name: common-db
  spec:
    replicas: 1
    selector:
      matchLabels:
        io.kompose.service: common-db
    strategy:
      type: Recreate
    template:
      metadata:
        annotations:
          kompose.cmd: kompose convert
          kompose.version: 1.21.0 ()
        creationTimestamp: null
        labels:
          io.kompose.service: common-db
      spec:
        containers:
        - env:
          - name: ALLOW_EMPTY_PASSWORD
            value: "yes"
          - name: MYSQL_DATABASE
            value: "common-development"
          - name: MYSQL_REPLICATION_MODE
            value: "master"
          - name: MYSQL_REPLICATION_PASSWORD
            value: "repl_password"
          - name: MYSQL_REPLICATION_USER
            value: "repl_user"
          image: bitnami/mysql:5.7
          imagePullPolicy: ""
          name: common-db
          ports:
          - containerPort: 3306
          securityContext:
            runAsUser: 0
          resources:
            requests:
              memory: 512Mi
              cpu: 500m
            limits:
              memory: 512Mi
              cpu: 500m
          volumeMounts:
            - name: common-db-initdb
              mountPath: /opt/bitnami/mysql/conf/my_custom.cnf
        volumes:
          - name: common-db-initdb
            configMap:
              name: common-db-config
        serviceAccountName: ""
  
  status: {}
  
  </code></pre>
  
  <p>The config map has the config <code>my.cnf</code> data. Any pointers on where I could be going wrong? Specially if the same image works in the <code>docker-compose</code>?</p>