← Back to team overview

dhis2-users team mailing list archive

Re: Changing DBs

 

You could also try changing the owner of the database (easy to do in PgAdmin
III) to the dhis user.

On Sat, Apr 10, 2010 at 5:32 PM, Knut Staring <knutst@xxxxxxxxx> wrote:

> Hi Roger,
>
> It does certainly sound like a problem with your hibernate.properties.
>
> Are you perchance running Postgres on a nonstandard port (not 5432)?
>
> If you have a Postgres user called dhis with password dhis running on port
> 5433 on your local machine, the following should be correct:
>
> hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
> hibernate.connection.driver_class = org.postgresql.Driver
> hibernate.connection.url = jdbc:postgresql://localhost:5433/dhis2
> hibernate.connection.username = dhis
> hibernate.connection.password = dhis
> hibernate.hbm2ddl.auto = update
>
> Knut
>
> On Sat, Apr 10, 2010 at 5:20 PM, Friedman, Roger (CDC/OID/NCHHSTP) (CTR) <
> rdf4@xxxxxxx> wrote:
>
>>  Hi all.
>>
>> Edem kindly provided me with a DB dump file to use. It was Postgres but I
>> had installed MySQL. So I just installed Postgres, created the DHIS2
>> database, created the dhis user and granted all on database to dhis. I
>> reloaded the backup and can see the data in the tables. I stopped dhis in
>> tomcat, changed the hibernate file to the Postgres version, and tried to
>> restart dhis. It fails. It looks like the problem was that hibernate could
>> not open the jdbc connection, message "Connections could not be acquired
>> from the underlying database!". Excuse me if I don,t type the whole error
>> chain on my Blackberry (remote e-mail access is down right now). Any
>> suggestions? I notice my mysql hibernate file has a //localhost before
>> :dhis2, the Postgres version does not.
>>
>> Thanks, Roger
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
> Cheers,
> Knut Staring
>



-- 
Cheers,
Knut Staring

Follow ups

References