python连接Phoenix
1、启动Phoenix监听端口 #启动,端口:8765 [root@node1 ~]# /opt/phoenix-4.11.0/bin/queryserver.py start starting Query Server, logging to /tmp/phoenix/root-queryserver.log [root@node1 ~]# netstat -ntlp |grep 8765 tcp6 0 0 :::8765 :::* LISTEN 50094/java 2、phoenixdb 安装包 #phoenixdb包的版本要和phoenix对应,参考官网: https://python-phoenixdb.readthedocs.io/en/latest/versions.html#version-0-7 #我的Phoenix是4.11,所以要安装0.7版本 >pip3 install phoenixdb==0.7 python脚本: #!/usr/bin/env python # encoding: utf-8 """ @author: 'Administrator' @contact: @time: """ import phoenixdb import phoenixdb.cursor database_url = 'http://node1:8765/' conn