title: Kubernetes mysql 8.0.13 do not initialize properly from ENV
body: <p>I am using mysql 8.0.13 from docker hub registry. I am not able to connect to the database from within the pod shell. However, I am able to do so when running the docker container on my localhost without using kubernetes. With reference to <a href="https://stackoverflow.com/questions/45650044/cant-connect-to-mysql-pod-in-kubernetes-when-using-secrets-for-password-access">Can&#39;t connect to mysql pod in Kubernetes when using Secrets for password (Access denied)</a>, I have tried both setting the root password value inside the manifest and using k8s secret but to no avail. I can't connect to it remotely but I can connect to a local container with the same image remotely. Even setting MYSQL_ALLOW_EMPTY_PASSWORD doesn't work but it works on localhost container without kubernetes.</p>
  
  <pre><code>khteh@khteh-T580:~ 2035 $ k exec -it mysql-0 -- bash
  root@mysql-0:/# mysql
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  root@mysql-0:/# mysql
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  root@mysql-0:/# mysql -p
  Enter password: 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  root@mysql-0:/# mysql -p""
  Enter password: 
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  root@mysql-0:/# echo $MYSQL_ROOT_PASSWORD
  
  root@mysql-0:/# 
  $ k exec -it mysql-0 -- bash
  root@mysql-0:/# mysql -uroot -p$MYSQL_ROOT_PASSWORD
  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)
  root@mysql-0:/# echo $MYSQL_ROOT_PASSWORD
  &lt;snip&gt;
  root@mysql-0:/# mysql -u$MYSQL_USER -p$MYSQL_PASSWORD
  mysql: [Warning] Using a password on the command line interface can be insecure.
  ERROR 1045 (28000): Access denied for user 'iconverse'@'localhost' (using password: YES)
  root@mysql-0:/# echo $MYSQL_PASSWORD
  &lt;snip&gt;
  root@mysql-0:/# mysql --version
  mysql  Ver 8.0.13 for Linux on x86_64 (MySQL Community Server - GPL)
  root@mysql-0:/# 
  </code></pre>
  
  <p>Any advice and insight is appreciated.</p>