Re: Moving from MySQL - Mailing list pgsql-novice

From Henshall, Stuart - Design & Print
Subject Re: Moving from MySQL
Date
Msg-id E382B5D8EDE1D6118DBE0008C759BCD6116B61@WCPEXCHANGE
Whole thread Raw
In response to Moving from MySQL  (Kevin Waterson <kevin@oceania.net>)
Responses Re: Moving from MySQL
List pgsql-novice

Kevin Waterson wrote:
> This one time, at band camp,
> "Rob" <rob@jamwarehouse.com> wrote:
>
>> For a quick solution run "netstat -tlnp" and see if postgres is
>> running.  If it is, kill it.  Otherwise just delete the loc file.  I
>> can't make any guarentees on how safe this is though ...
>
> Worked a treat, thanks
>
> now, if I do
> #createuser kevin
> from the command line it seems ok..
> but when I try
> [kevin@anthem file_db]$ psql kevin
> psql: FATAL 1:  Database "kevin" does not exist in the system catalog.
>
> How do I create the database from kevin
>
Assuming you are now the postgres user:
createdb kevin
you can invoke user kevin with any db as well
psql -U kevin -d template1
Note: If you want kevin to have all rights to the database kevin you'll have to make him the owner some how (eg create Kevin with createdb rights, create the database as Kevin, then remove the rights in psql (as postgres) alter user kevin nocreatedb).

hth,
- Stuart

DISCLAIMER:The information in this message is confidential and may be legally privileged. It is intended solely for the addressee.  Access to this message by anyone else is unauthorised.  If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful.  Please immediately contact the sender if you have received this message in error. Thank you.

pgsql-novice by date:

Previous
From: Kevin Waterson
Date:
Subject: Re: Moving from MySQL
Next
From: Tom Lane
Date:
Subject: Re: Moving from MySQL