通过终端访问pybossa数据库 [英] Access pybossa database through terminal

查看:126
本文介绍了通过终端访问pybossa数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题是,我已经用vagrant和juju安装了pybossa,所以当我尝试访问posgresql提示符时,它说没有安装postgresql,这是不可能的,因为pybossa已经投入生产,所以我什至无法尝试直接从数据库中执行导入-导出转储文件,我该怎么做,我知道如何从常规安装中进行操作,但是在流浪汉中,juju不能进入postgresql,原因是它未安装,有人可以帮助我到达流浪汉内部的postgresql命令提示符的步骤吗?

the thing is tath i had pybossa installed with vagrant and juju, so when i've tried to access to posgresql prompt it says no postgresql installed which is not possible cause pybossa is already in production so taths the reason i cannot even try to do a import-export dump file from database directly so how can i do it, i know how to do it from a normal installation but instead in a vagrant with juju a can't get inside the postgresql cause it says it is not installed, can anyone help me the steps to reach the postgresql command prompt inside the vagrant or if it's somenting I'm not doing?

推荐答案

PYBOSSA使用SQLAlchemy SQL工具包来访问数据库.

PYBOSSA uses the SQLAlchemy SQL toolkit to access the DB.

我认为是您安装它的方式,因为问题是,我在pybossa上安装了vagrant和juju,因此当我尝试访问posgresql时,提示否安装了postgresql是不可能的,因为pybossa已经在生产中了,所以我什至无法尝试直接从数据库中执行导入-导出转储文件,所以我该怎么做,我知道如何从常规安装中进行操作,但是在带有juju的流浪汉中,无法进入postgresql,原因是它未安装,有人可以帮助我找到流浪汉内部的postgresql命令提示符的步骤,或者如果我认为自己不在做,那该怎么办?"不确定清楚您要问什么.

The way in which, I think you installed it, because "the thing is tath i had pybossa installed with vagrant and juju, so when i've tried to access to posgresql prompt it says no postgresql installed which is not possible cause pybossa is already in production so taths the reason i cannot even try to do a import-export dump file from database directly so how can i do it, i know how to do it from a normal installation but instead in a vagrant with juju a can't get inside the postgresql cause it says it is not installed, can anyone help me the steps to reach the postgresql command prompt inside the vagrant or if it's somenting i'm not doing?" it is not exactly clear what you are asking.

要回答您的问题,您必须确保将数据库编辑为您的sqlalchemy数据库用户名和主机所使用的名称.

'postgresql://username:userpassword@localhost/databasename

来自数据库用户名和密码

数据库用户名和密码 - PYBOSSA使用SQLAlchemy SQL工具包来访问数据库.

Database username and password - PYBOSSA uses the SQLAlchemy SQL toolkit to access the DB.

  • 在设置文件中,您只需要修改用户名,密码和数据库名,即可满足您在SQLALCHEMY_DATABASE_URI _:

'postgresql://username:userpassword @ localhost/databasename'

'postgresql://username:userpassword@localhost/databasename'

这篇关于通过终端访问pybossa数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆