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
相关推荐
梦想与想象-广州大智汇4 天前
MySQL 同步数据到 ClickHouse 方案对比分析
数据库·mysql·clickhouse
Smile_2542204184 天前
clickhouse日志疯涨问题
linux·运维·服务器·clickhouse
计算机魔术师5 天前
【技术硬核 | 存储】ClickHouse 原理与 Langfuse 存储实践:当 LLM Trace 爆炸时,PG 还扛得住吗?
人工智能·clickhouse·工程实践·sbti·职场焦虑
fire-flyer8 天前
ClickHouse系列(九):慢查询、内存 OOM 与稳定性治理
android·clickhouse
fire-flyer8 天前
ClickHouse系列(十):生产架构与最佳实践总结
clickhouse·架构
fire-flyer8 天前
ClickHouse系列(八):ClickHouse 的 UPDATE / DELETE 正确姿势
大数据·数据库·clickhouse
fire-flyer8 天前
ClickHouse系列(七):Materialized View 与多分辨率 Rollup 设计
大数据·数据库·clickhouse·架构
fire-flyer10 天前
ClickHouse系列(二):MergeTree 家族详解
大数据·数据库·clickhouse
fire-flyer10 天前
ClickHouse系列(四):压缩不是为了省磁盘,而是为了更快的查询
数据库·clickhouse
l1t10 天前
测试clickhouse 26.3的新功能
数据库·clickhouse