Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgreSQL client -- How To Start It?

Tags:

postgresql

I just installed PostgreSQL-8.4 on Ubuntu. How do I start it / 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).

like image 238
user3262424 Avatar asked Apr 14 '11 15:04

user3262424


People also ask

How do I start postgres client?

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.

How do I start PostgreSQL in terminal?

Getting a PostgreSQL command prompt You can get a command shell in Windows by running cmd.exe. The CSEP544 shell launcher script will also open a shell for you. Type psql -U postgres at the prompt, and hit Enter. Here, postgres represents the username of the database superuser.

How do I start PostgreSQL GUI?

When you install PostgreSQL, pgAdmin is installed along with the other tools. To start pgAdmin, go to start menu and start pgAdmin. The server starts and displays the following window in browser. From the URL of the browser, we can learn that the server has provided us a Web Interface through the host 127.0.

Is there a PostgreSQL client?

PostgreSQL is a "client-server" database, which is an architecture design used by most relational databases.


2 Answers

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
like image 143
grantk Avatar answered Sep 18 '22 14:09

grantk


I start postgres prompt by using the following command:

 sudo -u postgres psql

I use Ubuntu 14.04

like image 32
Neelam Avatar answered Sep 22 '22 14:09

Neelam