clickhouse修改默认密码

1.明文密码

复制代码
vim /etc/clickhouse-server/users.xml

找到下面的语句,增加明文密码

复制代码
<password>123456789</password>
  1. sha256密码

    echo -n 123456789 | openssl dgst -sha256

    (stdin)= 15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225

修改user.xml里对应的密码和标签

复制代码
<password_sha256_hex>15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225</password_sha256_hex>
  1. sha1密码

    echo -n 123456789| openssl dgst -sha1 -binary | openssl dgst -sha1
    (stdin)= cc67043c7bcff5eea5566bd9b1f3c74fd9a5cf5d

修改user.xml里对应的密码和标签

复制代码
<password_double_sha1_hex>cc67043c7bcff5eea5566bd9b1f3c74fd9a5cf5d</password_double_sha1_hex>

重启服务
systemctl restart clickhouse-server

测试登录
clickhouse-client --password
相关推荐
小牛头#5 天前
clickhouse 各个引擎适用的场景
大数据·clickhouse·机器学习
全干engineer5 天前
ClickHouse 入门详解:它到底是什么、优缺点、和主流数据库对比、适合哪些场景?
数据库·clickhouse
爱吃萝卜的猪5 天前
Clickhouse诊断工具之chdig
clickhouse
源图客5 天前
ClickHouse介绍与应用
clickhouse
码农周5 天前
ClickHouse 时间范围查询:精准筛选「本月数据」
clickhouse
积跬步,慕至千里7 天前
clickhouse数据库表和doris数据库表迁移starrocks数据库时建表注意事项总结
数据库·clickhouse
Edingbrugh.南空8 天前
Flink ClickHouse 连接器数据读取源码深度解析
java·clickhouse·flink
Edingbrugh.南空8 天前
ClickHouse 全生命周期性能优化
clickhouse·性能优化
Edingbrugh.南空9 天前
Flink ClickHouse 连接器:实现 Flink 与 ClickHouse 无缝对接
大数据·clickhouse·flink
Edingbrugh.南空9 天前
Flink ClickHouse 连接器维表源码深度解析
java·clickhouse·flink