如何在python中连接orientdb集群和pyorient?我的orientdb集群在一个服务器中有两个主机,主机端口是2425和2426。
发布于 2016-03-29 12:53:52
我不知道它是否对您有用,在这个链接中有一个使用python的OrientDB示例。
发布于 2017-02-10 13:03:40
您可以使用两个客户端,一个用于每个集群。
client1 = pyorient.OrientDB("localhost", 2425)
# I do not why yet, but you need to first connect as root.
session1_id = client1.connect('root',root_password)
cluster1_info = client1.db_open(db_name, db_username, user_password)然后你的另一个客户
client2 = pyorient.OrientDB("localhost", 2426)
session2_id = client2.connect('root',root_password)
cluster2_info = client2.db_open(db_name, db_username, user_password)希望这会有所帮助;)
https://stackoverflow.com/questions/36259089
复制相似问题