# TinyERP will not find database

## MickKi

Hi All,

Having spent many hours trying to troubleshoot this I thought I might as well try here.  I have installed dev-db/postgresql:

```
[I] dev-db/postgresql

     Available versions:  7.3.15-r1 7.3.16 7.3.18 7.3.19 7.4.13 7.4.14 7.4.16 7.4.17 8.0.8 8.0.9-r1 8.0.12 8.0.13 ~8.1.5-r1 ~8.1.8 ~8.1.9 ~8.2.4-r1

     Installed versions:  8.0.13(09:31:50 06/10/07)(-doc kerberos nls pam perl -pg-intdatetime python readline -selinux ssl -tcl -test xml zlib)
```

 and tinyerp client and server:

```
[I] app-office/tinyerp-client

     Available versions:  ~4.0.2 (~)4.0.3

     Installed versions:  4.0.3(14:52:07 06/10/07)

     Homepage:            http://tinyerp.org/

     Description:         Open Source ERP & CRM client

[I] app-office/tinyerp-server

     Available versions:  ~4.0.2 (~)4.0.3

     Installed versions:  4.0.3(11:50:16 06/10/07)

     Homepage:            http://tinyerp.org/

     Description:         Open Source ERP & CRM
```

 I've ran the config scripts that the ebuilds recommend and nothing happened as a result (database was not created and I could not start it).  So I created a database by hand called terp and owned by postgres.  This resolved the error I was getting in tinyerp log:

```
INFO:init:connecting to database

INFO:init:could not connect to database 'terp'!
```

  Now, when I start tinyerp it seems to be happy:

```
INFO:objects:initialising distributed objects services

INFO:init:connecting to database

INFO:init:init db
```

This is where the joy ends.  When I launch tinyerp-client either on the same machine on which the tinyerp server runs, or on a different machine on my LAN or WAN, I get the same error:

```
No database found, you must create one!
```

 Can you please help me troubleshoot it?

----------

## MickKi

The error seems to be caused by the way the terp database is created by the # emerge --config =app-office/tinyerp-server-4.0.3 post-install script which creates a database called terp, but under the user name postgres (superuser).

```
# emerge --config =app-office/tinyerp-server                                                   -4.0.3

Configuring pkg...

 * In the following, the 'postgres' user will be used.

 * Creating database user terp ...                                        [ ok ]
```

  TinyERP seems to need the terp database to be able to run under user terp.

I have submitted a solution under Bug #181549.

----------

## sian

localhost ~ # emerge --config =app-office/tinyerp-server-4.0.3

Configuring pkg...

 * In the following, the 'postgres' user will be used.

And that'all. There is no creation of the terp database.

I do not know the problem. Do you use python 2.4 or 2.5 ?

----------

## roymaster

 *sian wrote:*   

> 
> 
> I do not know the problem. Do you use python 2.4 or 2.5 ?

 

Already solved it?

----------

