Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to get data from a Postgres database, but I am totally new to using Postgres.
I am here to ask my question to get some ideas from the best answer on how can I can do this. If possible, I'd also like a simple demo.

My question

I have one postgreSql database and I want to import them into my pgPhpAdmin using Commands.

How can I do so?
Please Help me Out with this.

How can I export a Postgresql database table into mySQL ?
Thanks.

share|improve this question
2  
possible duplicate of Importing records from PostgreSQL to MySQL –  Meredith Leu Aug 8 '13 at 9:36
    
@MeredithLeu U MEAN I AM TRY THIS COMMAND WITH MY DATABASAE NAME LIKE MY DATABASE NAME IS TECH AND I WANT TO THEM IMPORTING IN TO MY LOCALDRIVE D:/TECH.PGSQL. HOW I GOT THIS TYPE... THANKS –  vimal parmar Aug 8 '13 at 9:53
1  
...? Please, easy on the shouting. If you think my edit didn't reflect your actual question, go ahead and edit your own question. I've never imported something from Postgres to mySQL myself, but I think that question may start you on the road to finding your answer. –  Meredith Leu Aug 8 '13 at 9:58
3  
This question also shows a lot more research on your same problem. –  Meredith Leu Aug 8 '13 at 10:01
3  
@vimalparmar: DON'T SHOUT AT US. That is considered rude! –  a_horse_with_no_name Aug 8 '13 at 10:17
show 1 more comment

migrated from stackoverflow.com Aug 12 '13 at 6:01

This question came from our site for professional and enthusiast programmers.

1 Answer

I've never done a Postgres to mySQL migration before, but I know you can use the pg_dump tool to get a generated textfile of SQL statements you can use to reconstruct your database later.

The official Postgres documentation on pg_dump

You'd run this on Linux by opening up a terminal and typing in pg_dump at the prompt.

This dumps the default postgres database.

To get the dump of a database called TECH into a file called TECH.PGSQL you'd do:

pg_dump TECH > TECH.PGSQL

The > symbol is a redirection of the output of pg_dump into the specified file name TECH.PGSQL.

I'm afraid I don't have any experience with pgPhpAdmin or doing this on Windows, so I can't help you there. I suggest that you look around for how to perform a database dump in Postgres on Windows if that's the OS you're using.

share|improve this answer
    
This is command not a working sir –  vimal parmar Aug 8 '13 at 11:24
2  
@vimalparmar "Not working" is like "help". It says absolutely nothing. "when I run this command I get the following error message: " is the minimum you should always say. –  Craig Ringer Aug 8 '13 at 13:27
    
And don't call me a sir... –  Meredith Leu Aug 8 '13 at 21:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.