Apr 4, 2014

QNAP/Linux Tool - PostgreSQL / phpPgAdmin

In QNAP/Linux Tool - Create PostgreSQL Account and Database, we have create an user account "nas" and a database "testdb" through commands. Sometimes you just want to take a glimpse on the status of PostgreSQL, phpPgAdmin is an useful Web tool.
Login PostgreSQL through phpPgAdmin Web UI with account "postgres"
Login with "postgres", you have the full permission to manage your PostgreSQL.
Two databases: master db "postgres" and user-created db "testdb"
Click "Roles" to see all accounts and permissions as we just created in the previous article.
Check accounts and permissions (click Roles button)
In case that a QNAP NAS machine is used by several programmer, each one should login with his or her account. Login with general db user account "nas", the default database is "testdb" that is created by "nas".
Logout and login with "nas" user account: the default db is "testdb"
Of course, "nas" has no permission to see the system db "postgres". In this way, each programmer login with his or her account will see individual database.
"nas" has no permissions to access the master db "postgres"
Click SQL to write SQL queries directly and click Execute to run
Result of SQL query
You are familiar with GUI management interface to manage databases, but it is not suggested for QNAP programmers. The database and tables should be created through commands and scripts instead of manually operations through GUI, since your QNAP must be packaged into IPKG. Therefore, phpPgAdmin is only a management tool, don't think it as a programming tool.


No comments :

Post a Comment