Solved

phpMyAdmin to phpPgAdmin

Posted on 2010-09-21
5
957 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

707 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