clickhouse修改默认密码

1.明文密码

vim /etc/clickhouse-server/users.xml

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

123456789

2. sha256密码

# echo -n 123456789 | openssl dgst -sha256
(stdin)= 15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225

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

15e2b0d3c33891ebb0f1ef609ec419420c20e320ce94c65fbc8c3312448eb225

3. sha1密码

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

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

cc67043c7bcff5eea5566bd9b1f3c74fd9a5cf5d

 

重启服务
systemctl restart clickhouse-server

测试登录
clickhouse-client --password

你可能感兴趣的:(clickhouse)