• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1004
  • Last Modified:

phpMyAdmin to phpPgAdmin

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
error77
Asked:
error77
  • 2
  • 2
1 Solution
 
K VDatabase ConsultantCommented:
0
 
error77Author Commented:
Thanks theGhost_k8 but I'm looking more into some tool or something instead of having to do the process manually.

0
 
upandrun3Commented:
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
 
K VDatabase ConsultantCommented:

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now