Influxdb 访问Platfrom.sh上的XDB
目前,我正在尝试连接到一个托管在Platform.sh上的XDB,但没有任何运气 我按照上所述的设置说明进行操作。完成这些步骤后,该服务在Platform.sh上可用 之后,我使用Platform.sh的communityguide()连接到数据库 然后,我运行以下命令并选择连接到XDB服务的应用程序(Grafana)Influxdb 访问Platfrom.sh上的XDB,influxdb,platform.sh,Influxdb,Platform.sh,目前,我正在尝试连接到一个托管在Platform.sh上的XDB,但没有任何运气 我按照上所述的设置说明进行操作。完成这些步骤后,该服务在Platform.sh上可用 之后,我使用Platform.sh的communityguide()连接到数据库 然后,我运行以下命令并选择连接到XDB服务的应用程序(Grafana) platform tunnel:single && export PLATFORM_RELATIONSHIPS="$(platform tunnel:info -
platform tunnel:single && export PLATFORM_RELATIONSHIPS="$(platform tunnel:info --encode)"
Enter a number to choose an app:
[0] app
[1] grafana
> 1
Enter a number to choose a relationship:
[0] datadb
[1] confdb (main@confdb.internal)
> 0
SSH tunnel opened to datadb at: http://127.0.0.1:30000
然后我连接到XDB并尝试创建一个数据库:
influx -host '127.0.0.1' -port '30000'
Connected to http://127.0.0.1:30000 version 1.7.10
InfluxDB shell version: v1.7.9
> CREATE DATABASE test
ERR: error authorizing query: create admin user first or disable authentication
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use <database>".
如何连接到数据库?是否有默认用户或默认数据库?或者可以在services.yaml中定义一些设置吗
谢谢 正如我在网站上学到的,我必须创建一个管理员用户。隧道开放后,我不得不跑:
influx -host 127.0.0.1 -port 30000
Connected to http://127.0.0.1:30000 version 1.7.10
InfluxDB shell version: v1.7.9
> CREATE USER admin WITH PASSWORD 'admin' WITH ALL PRIVILEGES
之后,我使用新创建的用户重新连接到数据库
influx -host 127.0.0.1 -port 30000 -username admin -password ''
influx -host 127.0.0.1 -port 30000 -username admin -password ''