<p>I'm trying to deploy <a href="https://github.com/bitnami/charts/tree/master/bitnami/mysql" rel="noreferrer">bitnami/mysql</a> chart inside my <a href="https://minikube.sigs.k8s.io/docs/" rel="noreferrer">minikube</a>.
I'm using Kubernetes v1.19, Minikube v1.17.1 and <a href="https://helm.sh/" rel="noreferrer">Helm 3</a></p>
<p>I've created a PVC and PV as follow:</p>
<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: mysql-pvc
spec:
  storageClassName: standard
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi
  selector:
    matchLabels:
      id: mysql-pv
----
kind: PersistentVolume
apiVersion: v1
metadata:
  name: mysql-pv
  labels:
    type: local
    id: mysql-pv
spec:
  storageClassName: standard
  capacity:
    storage: 8Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: /var/lib/mysql
</code></pre>
<p>I've created the directory <code>/var/lib/mysql</code> by doing <code>sudo mkdir -p /var/lib/mysql</code>
And this is how I create my PVC and PC:</p>
<pre><code>kubectl apply -f mysql-pv-dev.yaml
kubectl apply -f mysql-pvc-dev.yaml
</code></pre>
<p>Which seems to work:</p>
<pre><code>NAME       STATUS   VOLUME     CAPACITY   ACCESS MODES   STORAGECLASS      AGE
mysql-pvc  Bound    mysql-pv   8Gi        RWO            standard          59s
</code></pre>
<p>I am deploying my <code>mysql</code> with:
<code>helm upgrade --install dev-mysql -f mysql-dev.yaml bitnami/mysql</code></p>
<p>Custom value file - <code>mysql-dev.yaml</code>:</p>
<pre><code>auth:
  database: dev_db
  username: dev_user
  password: passworddev
  rootPassword: rootpass
image:
  debug: true
primary:
  persistence:
    existingClaim: mysql-pvc
  extraVolumeMounts: |
      - name: init
        mountPath: /docker-entrypoint-initdb.d
  extraVolumes: |
      - name: init
        hostPath:
          path: /home/dev/init_db_scripts/
          type: Directory
volumePermissions:
  enabled: true
</code></pre>
<p>The deployement works:</p>
<pre><code>NAME         READY   STATUS    RESTARTS   AGE
dev-mysql-0  0/1     Running   0          8s 
</code></pre>
<p>the problem is that the pod never gets ready because:</p>
<pre><code>  Warning  Unhealthy  0s (x2 over 10s)  kubelet            Readiness probe failed: mysqladmin: [Warning] Using a password on the command line interface can be insecure.
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: YES)'
</code></pre>
<p><code>mysqld</code> is running inside the pod but for some reasons the root password isn't properly set because when I exec to the pod and try to connect to <code>mysql</code> I get:</p>
<pre><code>$ kubectl exec -ti dev-mysql bash
I have no name!@dev-mysql-0:/$ mysql -u root -prootpass
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I have no name!@dev-mysql-0:/$
</code></pre>
<p>Instead it's using the <a href="https://github.com/bitnami/charts/blob/master/bitnami/mysql/values.yaml" rel="noreferrer">default values</a> so if I try:
<code>mysql -u root -p</code> without password it works great.</p>
<p>Thanks</p>

<p>A bitnami engineer here,
I was able to reproduce the issue, I'm going to create an internal task to resolve this. We will update this thread when we have more information.</p>
