mysqlvitess

Vitess MySQL authentication is not working


While installing Vitess through helm in site-values.YAML we enabled authentication

  mysqlProtocol:
     enabled: false
     authType: secret
     # authType can be: none or secret. For secret, perform the following changes:
     username: mysqluser
     # this is the secret that will be mounted as the user password
     # kubectl create secret generic  mysql-user-passowrd --from-literal=password=abc_123
     passwordSecret:  mysql-user-passowrd

but after this, if we try to connect to mysql like mysql -h 10.108.8.197 -p 15991 -u mysqluser

and after entering password it's not authenticating and showing error Can't connect to MySQL server on '10.108.8.197' (111)

10.108.8.197 is our Vtgate service cluster IP, if we try from 127.0.0.1 also same

Is there anything we are missing?


Solution

  • What worked for us is deleted vitess installed through helm by helm delete vitess --purge then recreated vitess by enabling mysql protocol

    mysqlProtocol:
         enabled: true
         authType: secret
         # authType can be: none or secret. For secret, perform the following changes:
         username: mysqluser
         # this is the secret that will be mounted as the user password
         # kubectl create secret generic  mysql-user-passowrd --from-literal=password=abc_123
         passwordSecret:  mysql-user-passowrd