Lose the path to the db.

What you want is

sqlalchemy.url=postgresql+psycopg2://username:password@localhost:5432/defaultdb

That is, if you have created a database called "defaultdb" - postgresql 
doesn't have a default database out of the box.
You'd also have to configure postgresql to accept tcp connections on port 5432 
(the default port) and you have to create a role (username/password) with 
rights to access the "defaultdb" database.
See the postgresql manual for all that.



On Wed, Dec 16, 2015 05:45:37 PM [email protected] wrote:
> I also get this error in my postgresql94 server window 'FATAL:  database
> "/opt/local/var/db/postgresql94/defaultdb" does not exist’
> 
> But as far as I can tell I have the database configured correctly...
> 
> I have changed my path to the data to be
> 'sqlalchemy.url=postgresql+psycopg2://username:password@localhost:5432//opt/
> local/var/db/postgresql94/defaultdb'
> 
> I cannot see what I am doing wrong here... Postgres has been installed on
> OS X via macports and I ran initdb on the database directory and it all
> seems to have completed successfully...
> 
> Thanks.
> 
> On Thursday, 17 December 2015 11:40:48 UTC+11, [email protected] wrote:
> > Hi guys, I set my library path using, 'sqlalchemy.url=postgresql
> > +psycopg2://username:password@localhost:5432/opt/local/var/db
> > /postgresql94/defaultdb' But when I try to access it I get a
> > 'OperationalError: (psycopg2.OperationalError) FATAL:  database
> > "opt/local/var/db/postgresql94/defaultdb" does not exist’
> > 
> > Why is this happening, can somebody please help? Have I set my path
> > correctly? The database is stored there...
> > 
> > Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to