PostgreSQL client -- How To Start It?
I just installed PostgreSQL-8.4 on Ubuntu. How do I start it开发者_JS百科 / its GUI, connect to a database etc? I know SQL
, but can't find PostgreSQL
's icon in my Ubuntu 10.04 desktop (hence, am not sure how to start it).
Postgresql has no built in gui.
to check if it is running run the following from a terminal
ps aux | grep postgres
You can use psql to access from the command line.
to install psql
aptitude install postgresql-client
then to run
psql -h dbhost -U username dbname
If you want a gui intall package pgadmin
aptitude install pgadmin3
I start postgres prompt by using the following command:
sudo -u postgres psql
I use Ubuntu 14.04
If you're a Mac user, try running this
postgres -D /usr/local/var/postgres
then do
psql
you may start by firing up a graphical client. In a terminal type : pgadmin3
You will be presented with the pgAdmin III interface. Click on the "Add a connection to a server" button (top left). In the new dialog, enter the address 127.0.0.1, a description of the server, the default database ("mydb" in the example above), your username ("postgres") and your password.
With this GUI you may start creating and managing databases, query the database, execute SQl etc.
check out - https://help.ubuntu.com/community/PostgreSQL
精彩评论