1

我有一个 OrientDB 的本地实例(版本:2.2.20),我将它用作图形数据库。当我尝试从 DB Client 实例创建新数据库时,它会出现超时错误。代码如下所示,

import pyorient

####establishing connection with OrientDB

client=pyorient.OrientDB('localhost',2424)
session_id=client.connect('root','kavin')

####connect to database
####create one when there is no database
if client.db_exists('sample_db',pyorient.STORAGE_TYPE_MEMORY):
    client.db_open('sample_db','root','kavin')
    print('db exists')

else:
    print('db doesn\'t exists')
    client.db_create('sample_db',pyorient.DB_TYPE_GRAPH,pyorient.\
                                                STORAGE_TYPE_MEMORY

Traceback (most recent call last):
File "<pyshell#67>", line 1, in <module>
.......
timeout: timed out   

客户端对象给了我其他现有的数据库,连接没有任何问题。请建议我处理它

4

0 回答 0