mysql -> postgres

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Derek Neighbors
Date:  
Subject: mysql -> postgres
> Short List:
>
> as the "postgres" user (during install, you identified a "postgres"
> user, right?), from a shell command line:


No he is a debian snob so it didnt have to identify anything. :)

First log in as root or (su) then su postgres

Then do the createuser command below:

> createuser
> Enter name of user to add: mike
> Shall the new user be allowed to create databases? (y/n) y
> Shall the new user be allowed to create more new users? y
>
> (assuming your login account is "mike")


you need not have it be same as your login account, it could be anything
you like, but creating something same as your user name isnt a bad idea.

(From then on if you are logged in as user account that matches user
name you created you can type createuser from normal command prompt to
create additional users)

> Now, as the user "mike":
> createdb firstdb
> psql firstdb
> firstdb=#  <- the psql command line prompt for database "firstdb"
> firstdb=# \?    <- to see a list of backslash commands.
> firstdb=# \d    <- to list all tables.
> firstdb=# \h    <- for help on SQL commands.

>


If there really are enough people willing to attend a postgres class
(several week commitment) I will put the course work together and do
one.

-Derek