Error creating PostgreSQL database

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
afonsodev
Posts: 5
Joined: Sun Oct 08, 2017 2:24 pm

Error creating PostgreSQL database

Postby afonsodev » Sun Oct 08, 2017 2:43 pm

Hi,

I just installed Vesta Panel and everything seems fine. Great software!

I need support for PostgreSQL so I followed the instructions in here:
https://vestacp.com/docs/#how-to-setup- ... ian-ubuntu

Everything went fine. Just had to logout and login to see psgql option in the combobox when creating a new db.

This was the error that came up after clicking "ADD":
"ERROR: pgsql host localhost doesn't exist"

Attached screenshot (wait to load):
Image

What can I do?

Thank you

mehargags
Moderators
Posts: 743
Joined: Sat Sep 06, 2014 9:58 pm

Re: Error creating PostgreSQL database

Postby mehargags » Sun Oct 08, 2017 4:45 pm

I guess VestaCP is not able to sense and configure the PostgreSQL that you installed separately. Maybe someone has an idea to make them talk with each other.

You should have done and Advanced install with PostgreSQL checked. (--postgresql yes)

afonsodev
Posts: 5
Joined: Sun Oct 08, 2017 2:24 pm

Re: Error creating PostgreSQL database

Postby afonsodev » Sun Oct 08, 2017 5:41 pm

Ok I dig a little bit...

This validation fails:
https://github.com/serghey-rodin/vesta/ ... in.sh#L223

So... even after following:
https://vestacp.com/docs/#how-to-setup- ... ian-ubuntu

Still, this file does not exists:

Code: Select all

/usr/local/vesta/conf/pgsql.conf


Can I just copy /usr/local/vesta/conf/mysql.conf to /usr/local/vesta/conf/pgsql.conf ?

Cheers

afonsodev
Posts: 5
Joined: Sun Oct 08, 2017 2:24 pm

Re: Error creating PostgreSQL database

Postby afonsodev » Sun Oct 08, 2017 6:26 pm

Ok, I copy mysql.conf to pgsql.conf (also .mysql.localhost to .pgsql.localhost) and edit to this:

Code: Select all

HOST='localhost' USER='postgres' PASSWORD='xxxxxxxx' TPL='template1' CHARSETS='UTF8,LATIN1,WIN1250,WIN1251,WIN1252,WIN1256,WIN1258,KOI8' MAX_DB='500' U_SYS_USERS='admin,xxxxxx' U_DB_BASES='4' SUSPENDED='no' TIME='16:34:32' DATE='2017-10-02'


Now I got success:
Database xxxxxxxxx has been created successfully. / open phpPgAdmin


I hope this can help other...

Cheers

mehargags
Moderators
Posts: 743
Joined: Sat Sep 06, 2014 9:58 pm

Re: Error creating PostgreSQL database

Postby mehargags » Sun Oct 08, 2017 8:11 pm

Great if it works for you.
I don't have hands-on experience with Postgres but I would suggest you to use & watch your system for a few days. Also check if the VestaCP backup scripts can successfully backup your DBs fine or not.

If VestaCP is able to manage PGSQL DBs fine, please mark the topic solved

afonsodev
Posts: 5
Joined: Sun Oct 08, 2017 2:24 pm

Re: Error creating PostgreSQL database

Postby afonsodev » Sun Oct 08, 2017 10:18 pm

OK I tried a backup and It is giving error:

Can't dump database afonsodev_map1
/usr/lib/postgresql/9.5/bin/pg_dump: invalid option -- 'i'
Try "pg_dump --help" for more information.


Now I have to dig more... Any ideas? Thanks.

afonsodev
Posts: 5
Joined: Sun Oct 08, 2017 2:24 pm

Re: Error creating PostgreSQL database

Postby afonsodev » Sun Oct 08, 2017 10:33 pm

Following the v-backup-user command, I found the pgsql_dump in db.sh:
https://github.com/serghey-rodin/vesta/blob/04d617d756656829fa6c6a0920ca2aeea84f8461/func/db.sh#L91

I'm using version 9.5 in Ubuntu 16.04 and there is no -i option.

EDIT: after removing this option, the user backup completed.


Return to “Database Server”



Who is online

Users browsing this forum: Bing [Bot] and 5 guests