phpMyAdmin to phpPgAdmin

Posted on 2010-09-21
Medium Priority
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

Question by:error77
  • 2
  • 2
LVL 21

Expert Comment

by:K V
ID: 33725503

Author Comment

ID: 33725521
Thanks theGhost_k8 but I'm looking more into some tool or something instead of having to do the process manually.


Expert Comment

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,
LVL 21

Accepted Solution

K V earned 2000 total points
ID: 33725720

Open source:

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

Author Closing Comment

ID: 33729042
Expensive but bice tool: ESF Database Migration Toolkit.

Featured Post

Build your data science skills into a career

Are you ready to take your data science career to the next step, or break into data science? With Springboard’s Data Science Career Track, you’ll master data science topics, have personalized career guidance, weekly calls with a data science expert, and a job guarantee.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The title says it all. Writing any type of PHP Application or API code that provides high throughput, while under a heavy load, seems to be an arcane art form (Black Magic). This article aims to provide some general guidelines for producing this typ…
Among the most obnoxious of Exchange errors is error 1216 – Attached Database Mismatch error of the Jet Database Engine. When faced with this error, users may have to suffer from mailbox inaccessibility and in worst situations, permanent data loss.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

597 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