Access denied to database for root user in newly deployed cluster

Currently we are running a POC for Openshift. We would like to show our developers how quickly a pxc cluster can be deployed. Strictly following the instructions at https://www.percona.com/doc/kubernetes-operator-for-pxc/openshift.html we were able to deploy the cluster (all pods are running) but we are not able to connect to the database. Trying to connect to the database as shown in the above instructions always results in “access denied for user ‘root’@'…”

So… what did we wrong?

Hi,
if you were changing the default secrets when generating the new ones don’t forget to use “-n” parameter with echo, otherwise your secrets will be generated with newline and won’t work (also base64 is required). Note the whole command is: 

echo -n 'plain-text-password' | base64

You can try to connect directly to mysql on node0 (bypassing proxysql) to check credentials and access also with:

$ oc exec -it cluster1-pxc-0 -- mysql -uroot -proot_password
mysql> show status like '%wsrep_cluster%';

Thanks a lot for your quick answer!  Indeed, the problem was that I didn’t use “-n” with echo…