MySQL 修改密码
创建时间:2024-04-02 最近修改时间:2024-04-02
#1. MySQL 修改密码
- 先进入 mysql pod 修改密码
mysqladmin -u用户名 -p旧密码 password 新密码。
1
- 修改 values-custom 中
global.password.mysql的密码。 - deepflow-deploy -u 更新所有组件。
#2. Redis 修改密码
- 修改 values-custom 中
global.password.redis的密码。 - deepflow-deploy -u 更新所有组件。
#3. influxdb 修改密码
- 创建用户密码
# 进入 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
2
3
4
5
- 修改 values-custom 中
influxdb.authEnabled=ture - 修改 values-custom 中
global.password.influxdb的密码为上述修改的密码。 - deepflow-deploy -u 更新所有组件。
#4. influxdb 开启 https 认证(可选)
- 修改 values-custom 中
influxdb.httpsEnabled=ture - deepflow-deploy -u 更新所有组件。
#5. clickhouse 密码修改
- 修改 values-custom 中
global.password.clickhouse的密码。 - 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