-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 If the postgresql server is local you can simply use: postgresql+psycopg2://user:password@/defaultdb and don't need to accept TCP connections.
Thanks, - -- Jean-Denis Girard SysNux Systèmes Linux en Polynésie française http://www.sysnux.pf/ Tél: +689 40.50.10.40 / GSM: +689 87.79.75.27 Le 16/12/2015 16:11, Uwe Schroeder a écrit : > 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” – postgresq l > 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 defau lt > port) and you have to create a role (username/password) with rights to > access the “defaultdb” database. See the postgresql manual for all tha t. > > 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 install ed > on OS X via macports and I ran initdb on the database directory an d > it all seems to have completed successfully… > > Thanks. > > On Thursday, 17 December 2015 11:40:48 UTC+11, c.cs…@gmail.com wro te: > > Hi guys, I set my library path using, ‘sqlalchemy.url=postgres ql > +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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/turbogears. > For more options, visit https://groups.google.com/d/optout. -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAlZyQLcACgkQuu7Rv+oOo/h66wCgg+DQHr1LzDZz0Hcb8LFLKFIS looAn3IwSzSGD2jFP5td0INyoMv087u1 =F9xG -----END PGP SIGNATURE----- -- 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.

