Re: Moving from MySQL

Поиск
Список
Период
Сортировка
От Henshall, Stuart - Design & Print
Тема Re: Moving from MySQL
Дата
Msg-id E382B5D8EDE1D6118DBE0008C759BCD6116B61@WCPEXCHANGE
обсуждение исходный текст
Ответ на Moving from MySQL  (Kevin Waterson <kevin@oceania.net>)
Ответы Re: Moving from MySQL
Список 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 по дате отправления:

Предыдущее
От: Kevin Waterson
Дата:
Сообщение: Re: Moving from MySQL
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Moving from MySQL