Gentoo Archives: gentoo-user

From: Michael Orlitzky <michael@××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] switching production server from myswl to postgresql
Date: Thu, 22 Dec 2011 16:42:56
In Reply to: [gentoo-user] switching production server from myswl to postgresql by Tanstaafl
1 On 12/21/11 15:11, Tanstaafl wrote:
2 > Hi all,
3 >
4 > Ok, this has been on my ToDo list for a while, and I'm thinking of
5 > tacking this over the holidays, since the office will be much slower
6 > than usual.
7 >
8 > The only databases I have in use are for my mail server, which means
9 > postfix, courier-imap (soon to be dovecot 2.1 once it is released) and
10 > postfixadmin for maintaining the database.
11 >
12 > First question - I can run both mysql and postgresql at the same time,
13 > right? I haven't found anything saying I can't, and mysql doesn't seem
14 > to 'block' installing postgresql, so I'm guessing I can.
15 >
16 > Second question - has anyone ever converted an existing production mysql
17 > database to postgresql? If you have ever done this specifically for
18 > postfixadmin, I'd love to chat for a few minutes, but pointers to
19 > recent, accurate docs - even generically (not specifically for
20 > postfixadmin) for doing this would be appreciated.
22 Postfixadmin supports postgres, so you start by installing postgres
23 alongside your mysql installation, Next, run the postfixadmin scripts to
24 create the (empty) tables in your postgres database. All of the
25 postgres-specific stuff happens here, and postfixadmin does it for you.
27 After that, you just dump the mysql data, and load them into postgres.
28 Check out `man mysqldump` for some important options. This is the one I
29 remember off the top of my head:
31 --compatible=name
33 Produce output that is more compatible with other database systems
34 or with older MySQL servers. The value of name can be ansi,
35 mysql323, mysql40, postgresql...