You should create the database in Postgres database manager first (PgAdmin 
or so...).

I use following steps:

You should read how to start work with new Postgres server.
In Linux/Debian I use "peer" authentication for user "postgres", i.e. I 
have in
/etc/postgresql/9.4/main/pg_hba.conf
the line
local all postgres peer

Then I can log into psql as user "postgres" and set his password:
[root $] su - postgres
[postgres $] psql
[#] \password
[#] \q

Then I can in Postgres database manager (PgAdmin) attach the server:
server "localhost", user "postgres", password: from previous step

I create one database and one user for one web2py application and I do it 
so:
CREATE ROLE myuser LOGIN password 'somepassword';
CREATE DATABASE mydatabase ENCODING 'UTF8' OWNER myuser;

Then I can connect from web2py:
postgres://myuser:somepassword@localhost:5432/mydatabase

Previous works well.
So check what is different...




Dne středa 18. května 2016 15:58:03 UTC+2 Ghada Chabbouh napsal(a):
>
> Hi every one 
> acctually i'm binginner in web2py , and i'm trying to develope a web app 
> i wrote this syntaxe:  db = 
> DAL('postgres://postgres:123@localhost:5432/Gestion_maintenance', 
> pool_size=0,migrate=False)
> but i can't connect my postgresql database to my app ...
>  any one could help me or is there any tutorials with new update of web2py 
> ???
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to