MySQL 修改密码

创建时间:2024-04-02 最近修改时间:2024-04-02

#1. MySQL 修改密码

  1. 先进入 mysql pod 修改密码
mysqladmin -u用户名 -p旧密码 password 新密码。
1
  1. 修改 values-custom 中 global.password.mysql 的密码。
  2. deepflow-deploy -u 更新所有组件。

#2. Redis 修改密码

  1. 修改 values-custom 中 global.password.redis 的密码。
  2. deepflow-deploy -u 更新所有组件。

#3. influxdb 修改密码

  1. 创建用户密码
# 进入 influxdb 的 POD,创建用户密码
kubectl -n deepflow exec -it influxdb-deployment-xxxxxxxxxxxxxxx bash

influx -host 127.0.0.1 -port 20044 -username 'root' -password 'security421' -execute "CREATE USER root WITH PASSWORD 'security421' WITH ALL PRIVILEGES"
influx -host 127.0.0.1 -port 20044 -username 'root' -password 'security421' -execute "show users"
1
2
3
4
5
  1. 修改 values-custom 中 influxdb.authEnabled=ture
  2. 修改 values-custom 中 global.password.influxdb 的密码为上述修改的密码。
  3. deepflow-deploy -u 更新所有组件。

#4. influxdb 开启 https 认证(可选)

  1. 修改 values-custom 中 influxdb.httpsEnabled=ture
  2. deepflow-deploy -u 更新所有组件。

#5. clickhouse 密码修改

  1. 修改 values-custom 中 global.password.clickhouse 的密码。
  2. deepflow-deploy -u 更新所有组件。

#6. 参考资料

  • https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls.html
  • https://www.elastic.co/guide/en/elasticsearch/reference/current/get-started-enable-security.html
  • https://www.elastic.co/guide/en/elasticsearch/reference/current/http-clients.html