FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 12-21-2011, 07:11 PM
Tanstaafl
 
Default switching production server from myswl to postgresql

Hi all,

Ok, this has been on my ToDo list for a while, and I'm thinking of
tacking this over the holidays, since the office will be much slower
than usual.


The only databases I have in use are for my mail server, which means
postfix, courier-imap (soon to be dovecot 2.1 once it is released) and
postfixadmin for maintaining the database.


First question - I can run both mysql and postgresql at the same time,
right? I haven't found anything saying I can't, and mysql doesn't seem
to 'block' installing postgresql, so I'm guessing I can.


Second question - has anyone ever converted an existing production mysql
database to postgresql? If you have ever done this specifically for
postfixadmin, I'd love to chat for a few minutes, but pointers to
recent, accurate docs - even generically (not specifically for
postfixadmin) for doing this would be appreciated.


Thanks,

Charles
 
Old 12-21-2011, 07:18 PM
Michael Mol
 
Default switching production server from myswl to postgresql

Tanstaafl wrote:

Hi all,

Ok, this has been on my ToDo list for a while, and I'm thinking of
tacking this over the holidays, since the office will be much slower
than usual.

The only databases I have in use are for my mail server, which means
postfix, courier-imap (soon to be dovecot 2.1 once it is released) and
postfixadmin for maintaining the database.

First question - I can run both mysql and postgresql at the same time,
right? I haven't found anything saying I can't, and mysql doesn't seem
to 'block' installing postgresql, so I'm guessing I can.


Sure; they're different SQL engines. SQL isn't a standardized service
that you'd expect to find at a particular location or port.


They are, however, not entirely compatible. The SQL spec is
unfortunately vague, and even where it's relatively clear, popular
engines have idiosyncrasies that can result in application written for
one not quite working with another.




Second question - has anyone ever converted an existing production mysql
database to postgresql? If you have ever done this specifically for
postfixadmin, I'd love to chat for a few minutes, but pointers to
recent, accurate docs - even generically (not specifically for
postfixadmin) for doing this would be appreciated.


This is going to almost entirely depend on the application you want to
switch from being backed by mysql to postgresql. I'm not even sure
'mysqldump' has an export mode that can be easily massaged to be an
import mode for postgresql.


That said, the #postgresql IRC channel on FreeNode is one of the nicest
IRC channel's I've interacted with.
 
Old 12-22-2011, 03:41 PM
Michael Orlitzky
 
Default switching production server from myswl to postgresql

On 12/21/11 15:11, Tanstaafl wrote:
> Hi all,
>
> Ok, this has been on my ToDo list for a while, and I'm thinking of
> tacking this over the holidays, since the office will be much slower
> than usual.
>
> The only databases I have in use are for my mail server, which means
> postfix, courier-imap (soon to be dovecot 2.1 once it is released) and
> postfixadmin for maintaining the database.
>
> First question - I can run both mysql and postgresql at the same time,
> right? I haven't found anything saying I can't, and mysql doesn't seem
> to 'block' installing postgresql, so I'm guessing I can.
>
> Second question - has anyone ever converted an existing production mysql
> database to postgresql? If you have ever done this specifically for
> postfixadmin, I'd love to chat for a few minutes, but pointers to
> recent, accurate docs - even generically (not specifically for
> postfixadmin) for doing this would be appreciated.

Postfixadmin supports postgres, so you start by installing postgres
alongside your mysql installation, Next, run the postfixadmin scripts to
create the (empty) tables in your postgres database. All of the
postgres-specific stuff happens here, and postfixadmin does it for you.

After that, you just dump the mysql data, and load them into postgres.
Check out `man mysqldump` for some important options. This is the one I
remember off the top of my head:

--compatible=name

Produce output that is more compatible with other database systems
or with older MySQL servers. The value of name can be ansi,
mysql323, mysql40, postgresql...
 

Thread Tools




All times are GMT. The time now is 05:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org