postgre database not showing on cpanel

boyforeigner

Well-Known Member
May 18, 2003
46
0
156
Everything was working fine, after I migrate the database from one server to another using the dump all of the pg. The tables and the users just was gone from cpanel, but they are in the pgadmin just fine.

So I need to know how to make it show again. The new ones databases and the new users it says it was added but do not show on cpanel.

Anyone know how to fix it ?
 

garak

Active Member
Jan 23, 2004
40
0
156
In cPanel FAQ I found the solution:

Modify /var/lib/pgsql/data/pg_hba.conf
It should contain the following...

local all all md5
host all all 127.0.0.1 255.255.255.255 md5

Change 'md5' to 'trust' to disable authentication then restart postgres.
`/etc/init.d/postgresql restart`

Now you should be able to connect to postgresql as user 'postgres' without a password to modify the password.

`psql -u template1`

Run the following sql command.

"alter user postgres with password 'NEW PASSWORD HERE';"

Finally change /var/lib/pgsql/data/pg_hba.conf back to its original format and restart postgresql one more time.
Now you should be able to authenticate using user postgres and the password you specified.


BUT, this solution is absurd, because the postgre user stay with a non-md5 password!
Please cPanel team, fix this problem....
 
Last edited:

gemby

Well-Known Member
PartnerNOC
Feb 16, 2002
182
0
316
Pula, Croatia
cPanel Access Level
DataCenter Provider
garak said:
In cPanel FAQ I found the solution:

Modify /var/lib/pgsql/data/pg_hba.conf
It should contain the following...

local all all md5
host all all 127.0.0.1 255.255.255.255 md5

Change 'md5' to 'trust' to disable authentication then restart postgres.
`/etc/init.d/postgresql restart`

Now you should be able to connect to postgresql as user 'postgres' without a password to modify the password.

`psql -u template1`

Run the following sql command.

"alter user postgres with password 'NEW PASSWORD HERE';"

Finally change /var/lib/pgsql/data/pg_hba.conf back to its original format and restart postgresql one more time.
Now you should be able to authenticate using user postgres and the password you specified.


BUT, this solution is absurd, because the postgre user stay with a non-md5 password!
Please cPanel team, fix this problem....

Same problem here, here it comes, second bugzilla entry this week :-/
 

tlas

Registered
May 27, 2004
4
0
151
pg_hba.conf

try this :
local all postgres trust
local all all md5
host all all 127.0.0.1 255.255.255.255 md5
 

Leandro

Well-Known Member
Sep 23, 2003
48
0
156
Argentin
cPanel Access Level
DataCenter Provider
The error continue

Are any secure way to configure the pg_hba.conf

because if use the password login like:

local all postgre trust
local all all md5
host all all 127.0.0.1 255.255.255.255 md5

The result is:

test

Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: Password authentication failed for user "user" in /home/user/public_html/pg_test.php on line 43

and if i use in the pg_hba.conf, the result is:

local all all trust
host all all 127.0.0.1 255.255.255.255 trust



test

The connection to the database is Ok!!


But is very insure, what can i configure the file correct ???

Thanks and good day!!