jnidzwetzki / mysql-ha-cloud

This container image provides a highly available and replicated MySQL installation in Kubernetes or Docker Swarm. Consul, ProxySQL, and XtraBackup are used for leader election, load distribution, and backups.
Apache License 2.0
38 stars 16 forks source link

ProxySQL Error #3

Open onuryrlmz opened 1 year ago

onuryrlmz commented 1 year ago

Hi,

I have completed the installation, but when I want to connect to mysql, I encounter such an error.

[28000][1045] ProxySQL Error: Access denied for user 'mau'@'10.0.0.2' (using password: YES)

version: "3.8"

networks:
  backend:

volumes:
  backup-volume:

services:
  consul:
    image: consul:1.9
    networks:
       backend:
          aliases:
             - consul_cluster
    environment:
      - CONSUL_BIND_INTERFACE=eth0
    command: agent -ui -data-dir /consul/data -server -client 0.0.0.0 -retry-join consul_cluster -bootstrap-expect=3 
    deploy:
      replicas: 3
      endpoint_mode: dnsrr
      placement:
        max_replicas_per_node: 1
      update_config:
        parallelism: 1
        delay: 60s
      restart_policy:
        condition: on-failure
    ports:
       - target: 8500
         published: 8500
         protocol: tcp
         mode: host

  mysql:
    image: jnidzwetzki/mysql-ha-cloud:latest
    networks:
       backend:
    environment:
      - CONSUL_BIND_INTERFACE=eth1
      - CONSUL_BOOTSTRAP_SERVER=consul_cluster
      - MINIO_ACCESS_KEY=minio
      - MINIO_SECRET_KEY=4SrSScTuXBmP#@uV5gnE4*M4%
      - MINIO_URL=http://10.20.0.9:9009
      - MCM_BIND_INTERFACE=eth1
      - MYSQL_ROOT_PASSWORD=1qazcde3
      - MYSQL_BACKUP_USER=mbu
      - MYSQL_BACKUP_PASSWORD=1qazcde3
      - MYSQL_REPLICATION_USER=mru
      - MYSQL_REPLICATION_PASSWORD=1qazcde3
      - MYSQL_APPLICATION_USER=mau
      - MYSQL_APPLICATION_PASSWORD=1qazcde3
    deploy:
      replicas: 3
      placement:
        max_replicas_per_node: 1
      update_config:
        parallelism: 1
        delay: 60s
      restart_policy:
        condition: on-failure
    ports:
      - 6032:6032
      - 3306:6033

  minio:
    image: minio/minio:RELEASE.2020-10-18T21-54-12Z
    networks:
       backend:
          aliases:
             - minio_endpoint
    volumes:
       - backup-volume:/data
    ports:
       - 9009:9000
    environment:
       - MINIO_ACCESS_KEY=minio
       - MINIO_SECRET_KEY=4SrSScTuXBmP#@uV5gnE4*M4%
    command: server /data