无法连接到在 docker 容器中运行的 Influxdb

问题描述 投票:0回答:1

我正在尝试为我的项目设置 InfluxDB 数据库,并在我的 Docker 中添加了 InfluxDB 容器,但是当我尝试使用命令连接到数据库时

influx
它总是显示以下消息

root@0e36c4d4a53f:/# influx

Influx Client

Usage:
  influx [command]

Available Commands:xxxxxxx

Flags:
  -h, --help   Help for the influx command

Use "influx [command] --help" for more information about a command.

我应该得到

Connected to http://localhost:8086 version 1.7.7
InfluxDB shell version: 1.7.7".

我在这里做错了什么?

azure docker ubuntu-18.04 influxdb
1个回答
0
投票

这对我有用,进入容器并运行这个命令:

influx v1 shell --org-id {org-id} --token {token}

{org-id} 来自:

  1. 打开http://localhost:8086/
  2. 打开菜单简介 > 关于 > 组织 ID

{token} 来自:

  1. http://localhost:8086/api/v2/authorizations
© www.soinside.com 2019 - 2024. All rights reserved.