If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Postgresql dump convert to MySQL file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-19-08, 05:18
lennhor lennhor is offline
Registered User
 
Join Date: May 2008
Posts: 2
Postgresql dump convert to MySQL file

Hi to all! I have a simple question regarding converting a postgresql database dump file to MySQL file, is there software to convert the files?

Your help is much appreciated,


Thanks and Regards,
Len
Reply With Quote
  #2 (permalink)  
Old 05-19-08, 05:27
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
whats the format of the file
is it SQL or is it native POSTGRES?
It may be better to use a tool such as the MySQL import programme which can handle most db formats and insert the data into MySQL .. for get the name of it, its part ofd the MySQL GUI toolkit if I remember correctly
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 05-19-08, 18:00
loquin loquin is offline
Super Moderator
 
Join Date: Jun 2004
Location: Arizona, USA
Posts: 1,797
Hmmm. Seems like a backwards step.

Anyway, a postgresql dump can be configured as a standard text file output, containing the script to recreate the database and/or data. You also need to explicitly specify that inserts are used to insert the data, rather than the faster copy command.

After the dump has occurred, you'll need to manually adjust the SQL, as there are some differences, and as Postgresql has quite a few more features, there may be unsupported features that may nee adjustment.
__________________
Lou
使大吃一惊
"Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
"I have my standards. They may be low, but I have them!" - Bette Middler
"It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Reply With Quote
  #4 (permalink)  
Old 05-19-08, 18:22
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,407
Quote:
Originally Posted by loquin
Hmmm. Seems like a backwards step.
That's what I though as well
Who would want to convert a Postgres DB into a MySQL DB
Reply With Quote
  #5 (permalink)  
Old 05-19-08, 18:51
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by shammat
Who would want to convert a Postgres DB into a MySQL DB
someone who has been told to do so by his boss

someone who is moving his website to a new host that doesn't support postgresql

someone who is tired of not getting help fast enough from experienced postresql practitioners and wants to go play in a much larger pond

someone who ...

oh, heck, you get the idea
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #6 (permalink)  
Old 05-20-08, 03:04
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,407
Quote:
Originally Posted by r937
someone who is tired of not getting help fast enough from experienced postresql practitioners and wants to go play in a much larger pond
That someone is surely not posting the questions to the PG mailing list

Quote:
oh, heck, you get the idea
Sure I do, it was more meant as a joke (but with a little truth in it...)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On