凯发k8国际娱乐官网入口-k8凯发> 云数据库 geminidb> > > > > 通过python语言连接实例
更新时间:2023-11-21 gmt 08:00

通过python语言连接实例-凯发k8国际娱乐官网入口

本章节介绍了通过python语言连接geminidb influx实例的方法。

前提条件

已安装influxdb的python客户端。

使用非ssl方式连接实例的示例代码

from influxdb import influxdbclient
 
client = influxdbclient(host=ip, port=****, username=****, password=****, ssl=false) 
client.get_list_database()

上述host,port,username,password请以实际值为准。

使用ssl方式连接实例的示例代码

from influxdb import influxdbclient
client = influxdbclient(host=ip, port=****, username=****, password=****, ssl=true) 
client.get_list_database()
  • host,port,username,password请以实际值为准。
  • ssl的值必须设置为true。
  • 如果不设置ssl,或者ssl设置为false,则会报如下错误:

    influxdbclienterror: 400: client sent an http request to an https server.

分享:
网站地图