我正在尝试查找是否有一种方法可以登录到 pe-puppetdb 实例,就像您使用 mysql 实例一样。AKAmysql -u username -p我环顾四周,但我只真正看到卷入数据库的能力,但想实际与之交互。这可能吗?
我目前正在使用 Puppet 3.7.3 版(Puppet Enterprise 3.7.1)
我正在尝试查找是否有一种方法可以登录到 pe-puppetdb 实例,就像您使用 mysql 实例一样。AKAmysql -u username -p我环顾四周,但我只真正看到卷入数据库的能力,但想实际与之交互。这可能吗?
我目前正在使用 Puppet 3.7.3 版(Puppet Enterprise 3.7.1)
根据 PuppetDB 的设置方式,它使用内置的 HSQLDB 或 Postgres 来存储其数据。
如果您使用的是 Puppet Enterprise,那么它可能是 Postgres 后端。如果是这种情况,您可以使用以下psqsl命令访问它,例如:
[peter@pe-server]# psql
psql (9.3.4)
Type "help" for help.
peter=# \c puppetdb
You are now connected to database "puppetdb" as user "peter".
puppetdb=# select * from schema_migrations;
version | time
---------+-------------------------
1 | 2015-02-10 18:15:20.853
puppetdb=#
puppetdb=# \dt
List of relations
Schema | Name | Type | Owner
--------+-------------------------+-------+----------
public | catalog_resources | table | puppetdb
public | catalogs | table | puppetdb
public | certname_facts | table | puppetdb
public | certname_facts_metadata | table | puppetdb
public | certnames | table | puppetdb
public | edges | table | puppetdb
public | environments | table | puppetdb
public | latest_reports | table | puppetdb
public | reports | table | puppetdb
public | resource_events | table | puppetdb
public | resource_params | table | puppetdb
public | resource_params_cache | table | puppetdb
public | schema_migrations | table | puppetdb
(13 rows)
尝试psql -h 127.0.0.1 -p 5432 -U puppetdb -W puppetdb在您的 PuppetDB 服务器上运行,将用户名和密码更改为从您的 PE 安装中指定的用户名和密码。
这样做时要小心!您不想弄乱任何数据!:)