Chado needs to connect to a database to load or upgrade its schema.
It loads its configuration from /etc/gmod/gmod-chado.conf. This file is protected
 as it contains db password.

If file is not present, or configuration is not correct (db user not created ...),
package will continue its install, with a warning message containing instructions
 for a manual schema installation.

Instructions to create user and database:

**********************
Connect with user postgres

postgres@debiansid:~$ createuser --createdb -P  chado
Enter password for new role: 
Enter it again: 
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
root@debiansid:/usr/share/gmod/chado# psql -U chado -W -h localhost template1
Password for user chado: 
psql (9.1.1)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

template1=> CREATE DATABASE "gmod-chado"

***********************

Additional instructions for database tuning  are available in /usr/share/doc/chado/INSTALL.Chado


In case of db access failure during installation, after setting the configuration one should execute:

cd /usr/share/gmod/chado/
export GMOD_ROOT=/usr/share/gmod/chado
export PGPASSFILE=/usr/share/gmod/chado/pgpass

For a new installation:
  make load_schema
  make prepdb
OR
  make update
to upgrade the schema from a previous install

