mysql - Vitess MySQL 身份验证不起作用

标签 mysql vitess

在 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 mysqluser

输入密码后,它没有进行身份验证
并显示错误 Can't connect to MySQL server on '10.108.8.197' (111)

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

我们缺少什么吗?

最佳答案

对我们有用的是
通过 helm 删除 vitess 通过 helm 安装 delete vitess --purge 然后通过启用 mysql 协议(protocol)重新创建 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

关于mysql - Vitess MySQL 身份验证不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60561770/

相关文章:

jquery - codeigniter jquery 依赖下拉菜单

mysql - 远程读取MySQL?

java - Hibernate 标准和/或多对多

mysql新手——加入

vitess - 是否可以使用辅助分片 key 对 Vistess 进行分片

MySQL加载数据查询: Issue with Backslash (\)

kubernetes - vtctlclient:找不到命令

vitess - 从 mysql Workbench 连接 Vitess 的问题

mysql - Kubernetes 上的 Vitess

javascript - 通过node js将大blob插入到vitess中