Tuesday, October 26, 2010

18 Is On The Right Palm

PostgreSQL entry modes, user creation and

After installing PostgreSQL on a machine with Ubuntu, you must enter the system with a user and a database engine available in the database, for this can be used the following command.
  • -u user sudo psql dbname
As user to use postgres as postgres database, this will allow the user to access the database engine without a key rather than the root.

Once you have entered a user must be created to work with databases, this can be done with this command.
  • CREATE USER "user" CREATEDB CREATEUSER WITH PASSWORD 'password'
As a user must enter user name and password will be created and the key to user input, such as a user to create the same php must write the following.
  • CREATE USER "www-data" CREATEDB CREATEUSER WITH PASSWORD 'www-data'
To create a database owned by the user who has created you must use the command written below.
  • CREATE DATABASE db_name WITH OWNER = "user"
Once the user and the database has been created it can enter the following command PostgreSQL.
  • psql-h localhost-U username databasename
Then the motor requests to the user entered password in the process of creation. Now you can perform all you want with the database you just created.

"Thank you for sharing your knowledge"

0 comments:

Post a Comment