URL: http://www.phpfreaks.com/postgresqlmanual/page/app-createuser.html

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!

Comments

Peter Bengtsson

Test comment. Please ignore.

Anonymous

TESTING

Your email will never ever be published.

Previous:
Vivisimo - clustered searching January 8, 2004 Misc. links
Next:
PythonPoint January 10, 2004 Python
Related by category:
set -ex - The most useful bash trick of the year August 31, 2014 Linux
brotli_static in Nginx November 8, 2024 Linux
Be very careful with your add_header in Nginx! You might make your site insecure February 11, 2018 Linux
Linux tip: du --max-depth=1 September 27, 2007 Linux
Related by keyword:
Adding client-to-server sync to PissueTracker March 20, 2025 React, JavaScript, Bun
Connecting with psycopg2 without a username and password February 24, 2011 Python
UPPER vs. ILIKE April 19, 2010 Web development
How I performance test PostgreSQL locally on macOS December 10, 2018 Web development, PostgreSQL, macOS