Wednesday, September 16, 2009

Installing PostgreSQL

On a Debian Linux distribution such as Ubuntu, you can install postgresql (and a graphical administration tool) by using:

sudo apt-get install postgresql pgadmin3

and it merrily does its thing. It even starts the server for you. However, the default installation of PostgreSQL creates the root user "postgres" with no password. Furthermore, PGAdminIII requires that you enter at least one character in the password field or it complains. Doh!

After having experienced this twice (once in Mac OS X and once in Ubuntu Linux) I thought I'd jot this down for generations of administrators to come. Essentially, this post gives the best description of what to do:

  • Edit the pg_hba.conf file. The post gives the most useful information: the directory in which this file is located! (/etc/postgres...)
  • Instead of "md5", other posters say to change it to "trust". If you're running a dev system like me, "trust" is supposed to have fewer auth checks
  • To get the config changes to stick, restart using "/etc/init.d/postgresql-8.3 restart
  • To change the password, use "psql -U postgres". The master database is the default. psql should be in /usr/bin, which should be in your path
  • The semi-colon in the blog is important. You should get the response, "ALTER ROLE" if it worked properly

Trying to open PGAdminIII again, I was able to give it a non-blank password, which made it really happy.

1 comment:

  1. Interestingly, the game pays out more money when you play 5 cash. Knowing the principles of any video poker game you’re half in} might help as well. Check out the pay table any given titles provides so have the ability to|you possibly can} see what returns are attainable. Some consider that half in} the best game is 우리카지노 a skill in itself.

    ReplyDelete