Solved

phpMyAdmin to phpPgAdmin

Posted on 2010-09-21
5
906 Views
Last Modified: 2012-05-10
Hi all,

I have a project in phpMyAdmin which I need to import/convert to phpPgAdmin.

Hw can I convert it please? I have phpMyAdmin and phpPgAdmin all installed and setup, I just need to export from phpMyAdmin and import to phpPgAdmin.

Hope someone can help

Thanks
0
Comment
Question by:error77
  • 2
  • 2
5 Comments
 
LVL 21

Expert Comment

by:theGhost_k8
Comment Utility
0
 

Author Comment

by:error77
Comment Utility
Thanks theGhost_k8 but I'm looking more into some tool or something instead of having to do the process manually.

0
 
LVL 4

Expert Comment

by:upandrun3
Comment Utility
Hi Error77,

The main issue is going to be how your schema's convert. MySQL and PostgreSQL are close, but not that close in terms of how there schema's are defined.

What I'd suggest is this:

1.  Export just the schema from mysql
2. Export just the data from mysql, using an "insert into" type format.
3.  Try importing the schema into PostgreSQL
4. Review the errors you'll get and make manual adjustments to the schema. Goto 3
5. Once you have successfully imported a schema, then make a backup of it from PostgreSQL.
6. Try importing the data file
7. If errors occur, go into the data file and make corrections
  7a.  Drop the PostgreSQL tables and readd the dump of the schema you made
  7b. Goto 6.
8. Should have a converted database.

Things you'll need to watch for:

- specific data types that one database may support but not the other.
- Postgresql and MySQL handle auto generated IDs differently. You'll need to set up sequences for all tables that use auto_increment in MySQL and set the default value to be nextval() in Postgresql. Ideally, the data import will have static IDs for those fields, which will get added by the insert statements. Then you can go in, create sequences, set the next value and assign the default.
- You'll probably have to port over triggers or any other stored procedures or user functions manually.

- You may find that using the CLI tools provided by the two databases would make this work go by faster or help debug certain things.

Hope some of this helps,
Pete
0
 
LVL 21

Accepted Solution

by:
theGhost_k8 earned 500 total points
Comment Utility

Open source:
http://sqlfairy.sourceforge.net/
http://kettle.pentaho.org/

If you can invest, below is a good option too:
ESF Database Migration Toolkit
0
 

Author Closing Comment

by:error77
Comment Utility
Expensive but bice tool: ESF Database Migration Toolkit.
Thanks!
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now