【问题标题】:How to Find Username Password of cassandra如何找到cassandra的用户名​​密码
【发布时间】:2016-09-03 19:58:13
【问题描述】:

好吧,我是 cassandra 的新手,从开源安装后我不知道如何找到用户名和密码。我只是安装它。当我要将它连接到 netbeans 时,它会询问用户名和密码。但是在 cassandra 中,我找不到任何方法来找到它的用户名和密码。请告诉我查找用户名和密码的步骤。

【问题讨论】:

    标签: cassandra passwords


    【解决方案1】:

    停止您的 Cassandra 集群。 在每个节点上,cd 到您的数据目录,然后执行:

    $ mv system_auth system_auth_20140814
    

    重启每个节点。 只要身份验证器仍设置为(在您的 cassandra.yaml 中)以使用 PasswordAuthenticator,Cassandra 就会使用默认的 Cassandra 超级用户重建 system_auth 密钥空间,您可以使用 cqlsh 重新登录。

    $

    ./cqlsh -u cassandra -p cassandra
    Connected to MyCluster at 127.0.0.1:9042.
    [cqlsh 5.0.1 | Cassandra 2.1.0-rc5-SNAPSHOT | CQL spec 3.2.0 | Native protocol v3]
    Use HELP for help.
    cqlsh>
    

    注意事项:

    您必须重新添加所有用户,并重新应用他们的所有权限。 除了重命名(mv)system_auth 目录,您也可以删除它(rm)。 您必须将适当的复制设置重新应用到您的 system_auth 密钥空间。默认情况下,system_auth 的复制因子只有 1。

    【讨论】:

      【解决方案2】:

      如果是全新安装,请尝试 username cassandrapassword cassandra

      这是默认的用户名和密码。请记住更改可以通过 cqlsh 完成的更改。

      希望这会有所帮助。

      【讨论】:

      • 不,先生,当 netbeans 要求驱动程序用户和密码连接它时,我尝试输入 cassandra 作为用户和密码,但它没有用
      • 这个登录对我有用。
      猜你喜欢
      • 2016-10-09
      • 2017-01-31
      • 1970-01-01
      • 2018-07-27
      • 2017-11-16
      • 2014-03-14
      • 2010-09-05
      • 1970-01-01
      • 2021-08-10
      相关资源
      最近更新 更多