POstgreSQL 9 under Linux: Creating a user and a database for her

Here is how to create a PostgreSQL database user and a database for her under Linux.

First install the PostgreSQL server from your distribution and start it, e.g., under SuSE as root:

root@box> zypper in postgresql-server
root@box> /etc/init.d/postgresql start

Then switch to the postgres user and create the database using the psql SQL client:

root@box> su postgres
postgres@box> psql
psql> CREATE ROLE mydbuser WITH login password 'mypassword';
psql> CREATE DATABASE mydatabase OWNER mydbuser;
psql> \q

That’s it.


About dfspspirit

PhD student in bioinformatics, interested in photography, level design, digital image manipulation, architecture and, of course, bioinformatics.
This entry was posted in databases, linux and tagged , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s