helm / charts

⚠️(OBSOLETE) Curated applications for Kubernetes
Apache License 2.0
15.49k stars 16.8k forks source link

[percona-xtradb-cluster ] Access denied for user 'root'@'localhost' (using password: YES) #4785

Closed 13567436138 closed 6 years ago

13567436138 commented 6 years ago

Is this a request for help?

Version of Helm and Kubernetes: helm: Client: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"} Server: &version.Version{SemVer:"v2.8.2", GitCommit:"a80231648a1473929271764b920a8e346f6de844", GitTreeState:"clean"} kubernetes: Kubernetes v1.9.2+coreos.0

Which chart: percona-xtradb-cluster

What happened:

Access denied for user 'root'@'localhost' (using password: YES)

Events:
  Type     Reason                 Age               From               Message
  ----     ------                 ----              ----               -------
  Normal   Scheduled              9m                default-scheduler  Successfully assigned ant-mariadb-pxc-0 to node5
  Normal   SuccessfulMountVolume  9m                kubelet, node5     MountVolume.SetUp succeeded for volume "slash-root"
  Normal   SuccessfulMountVolume  9m                kubelet, node5     MountVolume.SetUp succeeded for volume "var-log"
  Normal   SuccessfulMountVolume  9m                kubelet, node5     MountVolume.SetUp succeeded for volume "mysql-startup-scripts"
  Normal   SuccessfulMountVolume  9m                kubelet, node5     MountVolume.SetUp succeeded for volume "mysql-config-files"
  Normal   SuccessfulMountVolume  9m                kubelet, node5     MountVolume.SetUp succeeded for volume "default-token-m5z8x"
  Normal   SuccessfulMountVolume  9m                kubelet, node5     MountVolume.SetUp succeeded for volume "pvc-19a622aa-3b2d-11e8-8dec-001e9098365d"
  Normal   Pulled                 9m                kubelet, node5     Container image "busybox:1.25.0" already present on machine
  Normal   Created                9m                kubelet, node5     Created container
  Normal   Started                9m                kubelet, node5     Started container
  Normal   Pulled                 9m                kubelet, node5     Container image "prom/mysqld-exporter" already present on machine
  Normal   Created                9m                kubelet, node5     Created container
  Normal   Started                9m                kubelet, node5     Started container
  Normal   Created                9m                kubelet, node5     Created container
  Normal   Pulled                 9m                kubelet, node5     Container image "percona/percona-xtradb-cluster:5.7.19" already present on machine
  Normal   Started                9m (x2 over 9m)   kubelet, node5     Started container
  Normal   Created                9m (x2 over 9m)   kubelet, node5     Created container
  Normal   Pulled                 9m (x2 over 9m)   kubelet, node5     Container image "busybox:1.25.0" already present on machine
  Normal   Started                9m                kubelet, node5     Started container
  Warning  Unhealthy              4m (x28 over 9m)  kubelet, node5     Readiness probe failed: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
13567436138 commented 6 years ago

values.yaml

# Default values for Percona XtraDB Cluster

## percona image and version
## ref: https://hub.docker.com/r/percona/percona-xtradb-cluster/tags/
image:
  repository: "percona/percona-xtradb-cluster"
  tag: "5.7.19"
  pullPolicy: IfNotPresent

# Desired number of members of xtradb cluster
replicas: 2

## Specify password for root user
##
mysqlRootPassword: youben

## Specify password for xtradb backup user
##
xtraBackupPassword: youben

## Uncomment to create a database user
##
# mysqlUser: test
# mysqlPassword: test

## Allow unauthenticated access, uncomment to enable
##
# mysqlAllowEmptyPassword: true

## Uncomment to Create a database
##
# mysqlDatabase: test

## hosts to allow root user access from
# set to "127.0.0.1" to deny remote root.
allowRootFrom: "%"

## Persist data to a persitent volume
persistence:
  enabled: true
  ## percona data Persistent Volume Storage Class
  ## If defined, storageClassName: <storageClass>
  ## If set to "-", storageClassName: "", which disables dynamic provisioning
  ## If undefined (the default) or set to null, no storageClassName spec is
  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
  ##   GKE, AWS & OpenStack)
  ##
  storageClass: "glusterfs-storage-dv"
  accessMode: ReadWriteMany
  size: 10Gi

## Node labels for pod assignment
## Ref: https://kubernetes.io/docs/user-guide/node-selection/
##
nodeSelector: {deploy: app}

## Configure resource requests and limits
## ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
# resources:
#  requests:
#    memory: 256Mi
#    cpu: 100m

configFiles:
  node.cnf: |+
    [mysqld]
    datadir=/var/lib/mysql
    default_storage_engine=InnoDB
    binlog_format=ROW
    innodb_flush_log_at_trx_commit  = 0
    innodb_flush_method             = O_DIRECT
    innodb_file_per_table           = 1
    innodb_autoinc_lock_mode=2
    bind_address = 0.0.0.0
    wsrep_slave_threads=2
    wsrep_cluster_address=gcomm://
    wsrep_provider=/usr/lib/galera3/libgalera_smm.so
    wsrep_cluster_name=ant
    wsrep_sst_method=xtrabackup-v2

## When set to true will create sidecar for `prom/mysqld-exporter`
## metrics exporting
metricsExporter: true

## When set to true will create sidecar to tail mysql log
logTail: true
wanghanlin commented 6 years ago

same problem here, tried root, the user specified, and xtrabackup, all access denied

edro commented 6 years ago

I was able to succeed with --set image.tag=5.7.18

helm install --name mysql stable/percona-xtradb-cluster \
--set image.tag=5.7.18 \
--set persistence.enabled=true \
--set persistence.storageClass=rbd \
--set persistence.size=30Gi \
--set mysqlUser=test \
--set mysqlPassword=test \
--set mysqlDatabase=test
liupeng0518 commented 5 years ago

same problem here 5.7.19

jcharlytown commented 5 years ago

Same problem.

lhrHarry commented 5 years ago

same problem here ,the problems have been solved?

SachinMaharana commented 4 years ago

Issue is still not solved. I am getting Access Denied error often. Any solution for this would be helpful.

xinghui-hou commented 4 years ago

same problem here

krakazyabra commented 4 years ago

This issue still not solved. Access denied for user 'root'@'localhost' (using password: YES) error on ver 5.7.18 and 5.7.19

lordunited commented 3 years ago

Access denied for user 'root'@'localhost' (using password: YES) I have this error with This helm chart too.

kekeliu-whu commented 2 years ago

Same problem too.