跳至主要内容

使用 Power BI ClickHouse 连接器时 ODBC 身份验证失败错误

·阅读时间:一分钟

问题

尝试使用连接器从 PowerBI 连接到 ClickHouse 时,您会收到以下身份验证错误

We encountered an error while trying to connect.
Details: "ODBC: ERROR [HY000] HTTP status code: 403
Received error:
Code: 516. DB::Exception: default: Authentication failed: password is incorrect, or there is no user with such name.
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.ml on the server where
ClickHouse is installed.

powerbi_error

回答

检查使用的密码,看看密码是否包含波浪号 ~

建议为连接使用专用用户并手动设置密码。如果使用 ClickHouse 云,并且需要使用 default 用户的管理员级权限,则创建一个新用户并分配 default_role

了解更多信息
https://clickhouse.ac.cn/docs/en/operations/access-rights#user-account-management
https://clickhouse.ac.cn/docs/en/cloud/security/cloud-access-management#database-roles