PostgreSql : Most common issues

To install PostgreSQL, run the following command in the command prompt:
sudo apt-get install postgresql
Test the installation by following command here 8.3 is the version which i am using
sudo /etc/init.d/postgresql-8.3 restart
Now that we can connect to our PostgreSQL server, Please make sure that you restart the server after making the below mentioned changes, the next step is to set a password for the postgres user. Run the following command at a terminal prompt to connect to the default PostgreSQL template database:
sudo -u postgres psql template1
The above command connects to PostgreSQL database template1 as user postgres. Once you connect to the PostgreSQL server, you will be at a SQL prompt. You can run the following SQL command at the psql prompt to configure the password for the user postgres.
ALTER USER postgres with encrypted password 'your_password';
Now you can also use the PGADMIN for the GUI with the following mentioned username and password.


  1. have used homebrew for your packages:

    take a look. curious to know your thoughts?

    1. I usually work on Ubuntu , I haven't had the chance to work on MAC that much i have worked on MAC for few months and at that time i have used port and that worked So was not able to play with homebrew ..


Post a Comment

Popular posts from this blog

Inserting and Moving elements inside Ruby Array

Find duplicate records in ServiceNow