Monday, June 29, 2009

Web-based Administration of PostgreSQL

The web-based administration tool for PostgreSQL is the "phppgadmin" software. The software is freely downloadable at the "http://phppgadmin.sourceforge.net" website.

To install the phppgadmin on Ubuntu 9.04, issue the command:

# apt-get install phppgadmin

Afterwards, the phppgadmin is now accessible using the browser at the localhost address of "http://localhost/phppgadmin".


Common Problem

1. You cannot access the database using the "postgres" user.

Solution:

login as postgres user and create another administrator user as follows:

# su postgres
$ psql
$ createuser myadmin

When prompted if the user will be "administrator", choose "yes" as follows:

postgres@asus:/home/clemrasul$ createuser
Enter name of role to add: myadmin
Shall the new role be a superuser? (y/n) y

Then, use the new administrator username and password to login into the phppgadmin web interface.



No comments: