问题
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?
回答1:
PYBOSSA uses the SQLAlchemy SQL toolkit to access the DB.
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.
- manual process of pybossa "Installing PYBOSSA by hand"
- This way is difficult
To answer your question, you have to make sure you edited the Database to whatever your sqlalchemy database username and host was.
'postgresql://username:userpassword@localhost/databasename
From Database username and password
Database username and password - PYBOSSA uses the SQLAlchemy SQL toolkit to access the DB.
In the settings file, you only need to modify the name of the user, password and database name so it fits your needs in the field
SQLALCHEMY_DATABASE_URI
_:'postgresql://username:userpassword@localhost/databasename'
来源:https://stackoverflow.com/questions/40873109/access-pybossa-database-through-terminal