Vitess MySQL 身份验证无效

Vitess MySQL authentication is not working

在 site-values.YAML 中通过 helm 安装 Vitess 时我们启用了身份验证

  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

但在此之后,如果我们尝试连接到 mysql mysql -h 10.108.8.197 -p 15991 -u mysql用户

并且在输入密码后它没有进行身份验证 并显示错误无法连接到“10.108.8.197”(111)

上的 MySQL 服务器

10.108.8.197 是我们的 Vtgate 服务集群 IP,如果我们从 127.0.0.1 尝试也一样

有什么我们遗漏的吗?

对我们有用的是 通过 helm delete vitess --purge 删除通过 helm 安装的 vitess,然后通过启用 mysql 协议

重新创建 vitess
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