ClickHouse访问密码失效

当遇到无法使用default用户登录ClickHouse的问题,报错显示密码错误或无此用户时,可以检查配置文件。默认密码通常存储在/etc/clickhouse-server/users.d/default-password.xml,删除或备份该文件可重置密码。执行命令`mvdefault-password.xmldefault-password.xml.bak`即可移除。

ClickHouse访问密码失效

问题描述

ClickHouse的版本:22.2.2.1

最开始通过RPM安装的时候,并没有设置过密码,但是首次通过客户端登陆的时候发现总是登陆不上去。于是按照网上普遍的解决办法:给默认的 default 用户设置密码(users.xml),但是设置后再次登陆依旧报这个错。

注:仔细看了下报错原因就能解决这个问题

在这里插入图片描述

Connecting to localhost:9000 as user default.

If you have installed ClickHouse and forgot password you can reset it in the configuration file.
The password for default user is typically located at /etc/clickhouse-server/users.d/default-password.xml
and deleting this file will reset the password.
See also /etc/clickhouse-server/users.xml on the server where ClickHouse is installed.

Code: 516. DB::Exception: Received from localhost:9000. DB::Exception: default: Authentication failed: password is incorrect or there is no user with such name. (AUTHENTICATION_FAILED)
默认用户的密码通常位于 /etc/clickhouse-server/users.d/default-password.xml
删除此文件将重置密码。

解决办法

移除default-password.xml文件

cd /etc/clickhouse-server/users.d/
mv default-password.xml default-password.xml.bak
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值