我试图创建一个远程系统。相关代码数据库如下SQLAlchemy的OperationalError:(OperationalError)无法打开数据库文件无无
log = core.getLogger()
engine = create_engine('sqlite:////name:[email protected]/tmp/nwtopology.db',echo=False)
Base = declarative_base()
Session = sessionmaker(bind=engine)
session = Session()
class SourcetoPort(Base):
""""""
__tablename__ = 'source_to_port'
id = Column(Integer, primary_key=True)
port_no = Column(Integer)
src_address = Column(String,index=True)
#-----------------------------------------
def __init__(self, src_address,port_no):
""""""
self.src_address = src_address
self.port_no = port_no
显然我试图在创建数据库给出一个远程系统。我得到的错误:
OperationalError: (OperationalError) unable to open database file None None
我的问题如下。
1)在本地机器上运行程序的用户与尝试在远程机器上创建数据库的用户不同。这是一个问题吗?
2)是否有任何机制可以通过创建本地缓存副本来改善将条目插入数据库和查询和输入的延迟?
Regards, Karthik。
我应该怎么做才能通过网络创建一个具有登录凭据的数据库? – liv2hak 2013-05-08 04:20:12