moving from postgres to mysql

Aaron Vegh aaronvegh-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Aug 3 13:56:51 UTC 2005


I don't know a whole lot about pgsql. If its output is a file that
contains the SQL statements that build the data (which is what MySQL
does), then you can use this command to get the data into MySQL:

In MySQL:
create database phpbb;
exit;

In the shell:
shell # mysql -u [username] -p[password] phpbb < output_pgsql_data.sql

At least, this is what I do when moving data between MySQL servers.

Cheers,
Aaron.



On 8/3/05, Jerome Macaranas <jerome-mhXWc29+iYPyG1zEObXtfA at public.gmane.org> wrote:
> Hi Alex,
> 
>         i have a phpBB forum and for some reason i need to switch to mysql... i have
> dumped pgsql data.. im trying it  out on how to load that data to mysql v4
> 
> tia,
> 
> 
> On Tuesday 02 August 2005 20:28, Alex Beamish wrote:
> > On 8/2/05, JM <jerome-mhXWc29+iYPyG1zEObXtfA at public.gmane.org> wrote:
> > > hi all,
> > >
> > >         is there an available application that can migrate postgres data
> > > to mysql
> >
> > Hi there,
> >
> > I've used both, and the main differences I can think of are that MySQL
> > does a little less .. no sub-selects, no referential integrity. I'm
> > not up to date with the latest version 4 of MySQL, so that may have
> > changed. My baseline is 3.2.2 of MySQL and 7.4.3 of PostgreSQL.
> >
> > If you do a pg_dump from PostgreSQL, and then load the result into
> > MySQL (it's been too long, I don't remember the comamnd) I'm guesing
> > that will work. Then you just have to get used to the differences in
> > how the command prompt works -- show tables instead of \d; and
> > describe table foo instead of \d foo.
> >
> > When you talk about changing a database, I presume this also means you
> > need to change an application, and that may be work involved work.
> > What versions of MySQL and PostgreSQL are you working with?
> >
> > Alex
> --
> The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
>
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list