On 3 de gener de 2017 4:34:52 CET, Allan Zhang <[email protected]> wrote:
>Hi,
>
>I have been unable to connect to the PostgreSQL database with the
>tryton 
>client.
>When creating the profile, it always says "Database: Could not connect
>to 
>server"
>
>Using tryton/trytond 4.2.0
>
>This is what I have done:
>started postgresql-9.5
>
>psql -U postgres
>CREATE USER al WITH PASSWORD 'a';
>CREATE DATABASE aldb WITH OWNER al;
>#GRANT ALL PRIVILEGES ON DATABASE aldb to al;
>\q
>
>output for psql -U postgres -c "list"
>                     List of databases 
>   Name    |  Owner   | Encoding |  Collate   |   Ctype    |   Access 
>privileges   
>-----------+----------+----------+------------+------------+-----------------------
> aldb      | al       | UTF8     | en_CA.utf8 | en_CA.utf8 | 
> postgres  | postgres | UTF8     | en_CA.utf8 | en_CA.utf8 | 
>template0 | postgres | UTF8     | en_CA.utf8 | en_CA.utf8 | =c/postgres
>  
>       +
>           |          |          |            |            | 
>postgres=CTc/postgres
>template1 | postgres | UTF8     | en_CA.utf8 | en_CA.utf8 | =c/postgres
>  
>       +
>           |          |          |            |            | 
>postgres=CTc/postgres
>(4 rows)
>
>
>tryton-admin -c /etc/tryton/trytond.conf -d aldb --all
>where /etc/tryton/trytond.conf is:
>[database]
>uri = postgresql://al:a@localhost/
>path = /var/lib/trytond
>
>After I create the database, I open the client. I have tried various 
>hostnames, with and without ports, and various attempts for the uri in
>the 
>.conf file without luck.
>
>I would appreciate any help! I have been at this for a while.

Once you have created the database and initialized it, you have to run the 
server with:

trytond -c <config_file> -d <database>

And then you should be able to connect on port 8000 of localhost.

Hope it helps!

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/FD525A68-440F-43C1-9058-7AAA308936F2%40koolpi.com.

Reply via email to