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 > How to convert a Postgresql database to Mysql

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-28-08, 13:20
fjg001 fjg001 is offline
Registered User
 
Join Date: Feb 2008
Posts: 2
Question How to convert a Postgresql database to Mysql

I have a web application with a Postgresql database. It's an open source software and I can access the source code. I would like to know if there is a way to convert the database to Mysql or if there is a place I can find more informations about the question.

Tank you very much for any answer.
Reply With Quote
  #2 (permalink)  
Old 02-28-08, 20:31
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
two minutes googling brought me here:
Quote:
PostgreSQL has a JDBC driver => http://jdbc.postgresql.org/
MySQL Migration Toolkit can migrate any database that has a JDBC driver => http://dev.mysql.com/downloads/migra...olkit/1.0.html.

Now do 1 + 1 :-)

-- http://forums.mysql.com/read.php?83,...9543#msg-79543
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 02-28-08, 21:14
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,609
I interpreted the question a bit differently than r937 did.

I'm assuming that fjg001 is asking if the SQL syntax that was written for PostgreSQL in the existing application will work against a MySQL database. It is possible that it might work, but it seems very unlikely that the SQL will work completely without changes.

Without knowing what the SQL code does, how it is organized, and how PostgreSQL specific it is, I can't even guess at how much work it will be to convert the application. The best that I can do is to suggest that you try it and see.

As r937 pointed out, the data conversion isn't hard at all. That should be little or no problem.

-PatP
Reply With Quote
  #4 (permalink)  
Old 02-29-08, 03:23
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
without knowing the details on both POSTGRES and MySQL I'd suspect that fjg001 is on a very very steep learning curve.

If you have the option; find an ISP that support POSTGRES, they do exist, and you will save yourself a mass of problems, not least of which is if the application is still being developed then you will have to go through the whole modification process again and again.

However it may be worth talking to the application developers, as its possible they may have designed the app with db portability in mind, and abstracted the data manipulation layer into separate classes which would be much much easier to convert and maintain.. heck they may even have a MySQL version either now or planned or in development.

converting from one DB to another without experience in either or both db's is in my books a daunting task.. not for the fainthearted
Reply With Quote
  #5 (permalink)  
Old 02-29-08, 06:20
dmsoft dmsoft is offline
Registered User
 
Join Date: Jan 2002
Location: Czech Republic
Posts: 9
Hello,

Take a look at dbconvert.com

Regards,
Dmitry
Reply With Quote
  #6 (permalink)  
Old 03-10-08, 13:06
fjg001 fjg001 is offline
Registered User
 
Join Date: Feb 2008
Posts: 2
Thank you for all your answers, guys. I have now a better idea of the question.
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