处理 Code:516. Authentication failed: password is incorrect or there is no user with such name.

这篇具有很好参考价值的文章主要介绍了处理 Code:516. Authentication failed: password is incorrect or there is no user with such name.。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

 在测试 ClickHouse 分布式表时,创建分布式表成功,但是查询数据时报错,如下:

Received exception from server (version 22.2.2):
Code: 516. DB::Exception: Received from 192.168.38.101:9000. DB::Exception: Received from 192.168.38.103:9000. DB::Exception: default: Authentication failed: pass
word is incorrect or there is no user with such name. (AUTHENTICATION_FAILED)

code: 516. db::exception: default: authentication failed: password is incorr,clickhouse,数据库,数据仓库,数据库开发,数据库架构,dba

排查后发现,是集群开始安装时设置了密码,而配置分布式表时,没有添加各服务器的用户名和密码,所以访问不到别的服务器的数据,在我们的/etc/clickhouse-server/config.d/metrika.xml中,加入用户名和密码即可正常查询数据,如下: 

<clickhouse_remote_servers>
<!--market_ck_cluster:for market business and Marketing platform-->
<market_ck_cluster>
    <shard>
        <internal_replication>true</internal_replication>
        <replica>
            <host>192.168.38.101</host>
            <port>9000</port>
            <user>default</user>
            <password>123456</password>

         <password_sha256_hex>8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92</password_sha256_hex>
        </replica>
        <replica>
            <host>192.168.38.102</host>
            <port>9000</port>
            <user>default</user>
<password>123456</password>          <password_sha256_hex>8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92</password_sha256_hex> 
       </replica>
    </shard>
    <shard>
        <internal_replication>true</internal_replication>
        <replica>
            <host>192.168.38.103</host>
            <port>9000</port>
            <user>default</user>
<password>123456</password>

            <password_sha256_hex>8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92</password_sha256_hex>
</replica>
    </shard>
</market_ck_cluster>
</clickhouse_remote_servers>


就是这两行:

 <user>default</user>
 <password>123456</password>

 修改完成后,查询分布式成功:

node102 :) select dt ,count(id) from dbapi_db.dwd_middle_homework_students_correct_detail_1_all  group by dt order by dt;

SELECT
    dt,
    count(id)
FROM dbapi_db.dwd_middle_homework_students_correct_detail_1_all
GROUP BY dt
ORDER BY dt ASC

Query id: 1409ea4e-0f74-417d-9026-8409a2e4e887

┌─dt─────────┬─count(id)─┐
│ 2022-06-09 │    522346 │
│ 2022-06-10 │    460020 │
└────────────┴───────────┘

2 rows in set. Elapsed: 0.052 sec. Processed 982.37 thousand rows, 51.08 MB (19.05 million rows/s., 990.39 MB/s.)

问题解决,开始开心的学习.....文章来源地址https://www.toymoban.com/news/detail-583293.html

到了这里,关于处理 Code:516. Authentication failed: password is incorrect or there is no user with such name.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包赞助服务器费用

相关文章

  • Incorrect username or password ( access token )

    Incorrect username or password ( access token )

    报错场景 上传项目到Gitee时,最后一步推到Gitee分支上 报了如下图所示错误: Incorrect username or password ( access token ) 翻译过来就是:不正确的用户名或密码(访问令牌) 原因分析 造成该报错的原因有两种情况: 1、第一次输入SSH输入验证时,输错了用户名或密码; 2、由于之前修

    2024年02月12日
    浏览(6)
  • git push 到 github 出现 fatal: Authentication failed 的处理方案

    git push 到 github 出现 fatal: Authentication failed 的处理方案

    花了不少时间,记录一下这个问题。 问题截图: 解决方式(点击链接有官方文档说明): 将远程 URL 从 SSH 切换到 HTTPS(已经是https的直接忽略) 生成细粒度token 安装Github CLI缓存token 使用 gh auth login 按提示操作登陆即可正常操作。

    2024年02月11日
    浏览(6)
  • remote: Incorrect username or password ( access token )

    remote: Incorrect username or password ( access token )

    在使用Git进行项目代码提交到gitee的最后一步操作的时候,出现了一个问题,这个问题的意思大概是:用户名或密码不正确(访问令牌) git出错截图: 出现这个问题表示你的账户或者密码输入错误,但是你重新输入 git push -u origin master 的命令时他并不会再次弹出输入账户密码

    2024年02月12日
    浏览(8)
  • Git报错 Incorrect username or password (access token) 的解决方式

    Git报错 Incorrect username or password (access token) 的解决方式

    在使用git的时候 出现 Incorrect username or password (access token) ,这个报错主要就是代表本地保存的gitee或者GitHub的账号还有密码错误。而他们这些账号密码都保存到了 windows的凭据管理器 首先打开windows的凭据管理器 凭据管理器所在的位置: 控制面板用户帐户凭据管理器 同样直

    2024年02月13日
    浏览(7)
  • Gitee ---- 在clone的时候需要用户密码 -- Incorrect username or password (access token)

    Gitee ---- 在clone的时候需要用户密码 -- Incorrect username or password (access token)

    在gitee 使用 git clone 指令进行克隆的时候会出现一个弹出框 第一种 注意这里用户名是输入 邮箱地址、邮箱地址、邮箱地址 密码还是自己的登陆(gitee)的密码 问题: 凭证用户名和密码还是以前的,导致无法自动登陆(ps: 成功登陆过一次会自动生成凭证) 文字版: win + R 打开命令

    2024年02月05日
    浏览(9)
  • Geth --- Error: authentication needed: password or unlock

    Geth --- Error: authentication needed: password or unlock

    Error: authentication needed: password or unlock   在调用sendTransaction()进行转账时报错,意思是用户未解锁。   新用户默认是上锁的,交易前需要先解锁。   如下图,解锁要交易的两个用户   解锁后再交易,交易提交成功。   参考链接: https://blog.miuyun.work   如有不对,烦请指出,

    2024年02月13日
    浏览(9)
  • git提交代码出现错误remote: [31mx-oauth-basic: Incorrect username or password (access token)

    remote: [31m[session-XXXX] x-oauth-basic: Incorrect username or password (access token)[0m Authentication failed for 上传gitee仓库报错明明密码没错,提示上面信息 1、在终端输入 2、记得要重启idea 或是其他软件,然后再进行拉取和推送。

    2024年02月03日
    浏览(8)
  • workbench 链接mysql 报错 authentication plugin caching_sha2_password

    workbench 链接mysql 报错 authentication plugin caching_sha2_password

    用workbench连接MySQL出现Authentication plugin ‘caching_sha2_password’ cannot be loaded的问题,如下图 原因 出现这个问题的原因是由于Navicat和MySQL的版本问题, mysql8 之前,加密规则是mysql_native_password; mysql8 之后,加密规则是caching_sha2_password。 解决方法一种是升级Navicat驱动,一种是My

    2024年02月11日
    浏览(9)
  • Support for password authentication was removed on August 13, 2021 解决方案

    Support for password authentication was removed on August 13, 2021 解决方案

    打开你的github,Setting 点击Developer settings。 点击generate new token 按照需要选择scope 生成token,以后复制下来。 给git设置token样式的remote url 然后就可以正常访问了。

    2024年02月08日
    浏览(12)
  • 2059-Authentication plugin‘caching_sha2_password‘cannot be loaded

    2059-Authentication plugin‘caching_sha2_password‘cannot be loaded

    2059-Authentication plugin’caching_sha2_password’cannot be loaded 由于目前已有的客户端连接软件还不支持Mysql8新增加的加密方式:caching_sha2_password 老的加密验证方式:mysql_native_password 1、打开MySQL 8.0 Command Line Client,控制面板搜索即可搜到,打开即可 2、输入密码 3、输入以下命令 其实

    2024年02月05日
    浏览(8)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包