【发布时间】:2017-12-08 10:54:56
【问题描述】:
我已使用数据库“dbvishntest”中的以下 api 调用推送数据
curl -XPOST http://<localhost>:8086/write?db=dbvishnutest --data-binary "weather,location=us-midwest temperature=82 1465839830100400200"
现在我正在尝试使用下面的 api 调用来拉回数据。
curl -i -XPOST -G http://<localhost>:8086/query?pretty=true --data-urlencode "dbvishnutest" --data-urlencode "q=select * from weather where location=us-midwest"
我收到以下错误:
HTTP/1.1 200 OK
Content-Type: application/json
Request-Id: 1966e27f-dc05-11e7-8087-000000000000
X-Influxdb-Build: OSS
X-Influxdb-Version: 1.4.2
X-Request-Id: 1966e27f-dc05-11e7-8087-000000000000
Date: Fri, 08 Dec 2017 10:46:51 GMT
Transfer-Encoding: chunked
{
"results": [
{
"statement_id": 0,
"error": "database name required"
}
]
}
我是 influx db 的新手,我尝试修复但无法修复。
有人可以纠正我的错误吗?在此先感谢:)
【问题讨论】: