Solved

phpMyAdmin to phpPgAdmin

Posted on 2010-09-21
5
943 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 21

Expert Comment

by:theGhost_k8
ID: 33725503
0
 

Author Comment

by:error77
ID: 33725521
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
ID: 33725536
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
ID: 33725720

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
ID: 33729042
Expensive but bice tool: ESF Database Migration Toolkit.
Thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

736 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