Creating a user for postgresql

10 January 2004   2 comments   Linux

Mind That Age!

This blog post is 13 years old! Most likely, its content is outdated. Especially if it's technical.

Powered by Fusion×

PostgreSQL This took some time to figure out (found answer here)and it might come in handy sometime in the far future so I write it down here and now.
To create a user for the postgresql database on linux you have to do that from the linux user called postgres.

This would not work:

peterbe@computer:~$ createuser peterbe

What you need to do is this:

peterbe@computer:~$ su -
...log in as root...
computer:~# su postgres
computer:/root$ createuser peterbe

Now I know!

Follow @peterbe on Twitter


Peter Bengtsson
Test comment. Please ignore.
Peter Bengtsson
Thank you for posting a comment

Your email will never ever be published

Related posts

Vivisimo - clustered searching 08 January 2004
PythonPoint 10 January 2004
Related by Keyword:
How do log ALL PostgreSQL SQL happening 20 July 2015
Fastest database for Tornado 09 October 2013
Postgres collation errors on CITEXT fields when upgrading to 9.1 21 May 2012
Connecting with psycopg2 without a username and password 24 February 2011
Optimization of getting random rows out of a PostgreSQL in Django 23 February 2011
Related by Text:
"No space left on device" on OSX Docker 03 October 2017
How do log ALL PostgreSQL SQL happening 20 July 2015
One thing I hate about Linux: cron 31 March 2008
From Postgres to JSON strings 12 November 2013
Migration of Postgres 9.2 to 9.3 with Homebrew and json_enhancements 30 April 2014