Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

titleFile ""
borderStylesolid

...

  • You can connect to the database with the pgAdmin tool (Start - Programs - PostgreSQL 8.4 - pgAdmin III)
  • Use psql command shell.

Create new user

Create an user with password for e.g. Liferay Portal usage:

Code Block
titleCreate new database user
borderStylesolid

$ psql -U postgres -c "CREATE USER pg_liferay WITH PASSWORD 'life1ray2' CREATEDB"
CREATE ROLE
$

Create a new database

Create e.g. database pg_liferay for Liferay Portal usage:

Code Block
titleCreate new database
borderStylesolid

$ psql -U postgres -d template1 -c "CREATE DATABASE pg_liferay ENCODING='UNICODE';"
CREATE DATABASE
$

Grant all permissions for a database to an user

Code Block
titleGrant all permissions for a database to an user
borderStylesolid

$ psql -U postgres -d template1 -c "GRANT ALL PRIVILEGES ON DATABASE pg_liferay to pg_liferay;"
GRANT
$