Thread: Importing MySql dumped db into pgadmin

Importing MySql dumped db into pgadmin

From
miks87
Date:
Hi there,
I'd like to import an entire database into pgadmin. I dumped the sql version
of it but now I can't get pgadmin to accept the file and build up the
database. I'm a newbie so probably I'm doing something wrong
Any hint?



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Importing-MySql-dumped-db-into-pgadmin-tp5780055.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



Re: Importing MySql dumped db into pgadmin

From
Theodore Petrosky
Date:

did you use pg_dump to create the sql? what was the exact method you used to create the dump?

if pg_dump was there compression?



On Nov 24, 2013, at 10:49 AM, miks87 <michele.imperiali@hotmail.it> wrote:

> Hi there,
> I'd like to import an entire database into pgadmin. I dumped the sql version
> of it but now I can't get pgadmin to accept the file and build up the
> database. I'm a newbie so probably I'm doing something wrong
> Any hint?
>
>
>
> --
> View this message in context:
http://postgresql.1045698.n5.nabble.com/Importing-MySql-dumped-db-into-pgadmin-tp5780055.html
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql




Re: Importing MySql dumped db into pgadmin

From
Adrian Klaver
Date:
On 11/24/2013 07:49 AM, miks87 wrote:
> Hi there,
> I'd like to import an entire database into pgadmin. I dumped the sql version
> of it but now I can't get pgadmin to accept the file and build up the
> database. I'm a newbie so probably I'm doing something wrong
> Any hint?

What program did you use to dump the MySQL db and what parameters did 
you use?

Define pgadmin did not accept.
How did you use pgadmin to execute the file?
Did it throw an error and if so what was the error?



>
>
>
> --
> View this message in context:
http://postgresql.1045698.n5.nabble.com/Importing-MySql-dumped-db-into-pgadmin-tp5780055.html
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>


-- 
Adrian Klaver
adrian.klaver@gmail.com



Re: Importing MySql dumped db into pgadmin

From
miks87
Date:
I'm using phpMyAdmin and I don't see any option to export using pg_dump.



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Importing-MySql-dumped-db-into-pgadmin-tp5780055p5780060.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



Re: Importing MySql dumped db into pgadmin

From
miks87
Date:
Hi Adrian, thanks for your answer. I'm using the export wizard from within
phpmyadim and I'm exporting in SQL. Then I'm simply trying to execute the
SQL code within pgAdmin but I get several errors in the code: a few examples
are the use of "AUTO_INCREMENT" or also check conditions on table attributes
(I get error on the clause ON). Also I get error when integer attributes are
specified with the notazion int(maxlength)...



--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Importing-MySql-dumped-db-into-pgadmin-tp5780055p5780061.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.



Re: Importing MySql dumped db into pgadmin

From
Jan Lentfer
Date:
Hi,<br /><br /> it won't work that way because mysql is just too different. You might want to look at the latest
versionof pgloader.<br /><br /> Regards<br /><br /> Jan<br /><br /><div class="gmail_quote"><br /><br /> miks87
<michele.imperiali@hotmail.it>schrieb:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex;
border-left:1px solid rgb(204, 204, 204); padding-left: 1ex;"><pre class="k9mail">Hi Adrian, thanks for your answer.
I'musing the export wizard from within<br />phpmyadim and I'm exporting in SQL. Then I'm simply trying to execute
the<br/>SQL code within pgAdmin but I get several errors in the code: a few examples<br />are the use of
"AUTO_INCREMENT"or also check conditions on table attributes<br />(I get error on the clause ON). Also I get error when
integerattributes are<br />specified with the notazion int(maxlength)...<br /><br /><br /><br />--<br />View this
messagein context: <a
href="http://postgresql.1045698.n5.nabble.com/Importing-MySql-dumped-db-into-pgadmin-tp5780055p5780061.html">http://postgresql.1045698.n5.nabble.com/Importing-MySql-dumped-db-into-pgadmin-tp5780055p5780061.html</a><br
/>Sentfrom the PostgreSQL - sql mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br /><br
/></pre></blockquote></div><br/> -- <br /> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet. 

Re: Importing MySql dumped db into pgadmin

From
Adrian Klaver
Date:
On 11/24/2013 08:21 AM, miks87 wrote:
> Hi Adrian, thanks for your answer. I'm using the export wizard from within
> phpmyadim and I'm exporting in SQL. Then I'm simply trying to execute the
> SQL code within pgAdmin but I get several errors in the code: a few examples
> are the use of "AUTO_INCREMENT" or also check conditions on table attributes
> (I get error on the clause ON). Also I get error when integer attributes are
> specified with the notazion int(maxlength)...

Yea, as previously noted that will not work.

Some docs:

https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL

Per the pgloader suggestion take a look at this blog from the author:

http://tapoueh.org/blog/2013/11/12-migrating-sakila

>
>
>
> --
> View this message in context:
http://postgresql.1045698.n5.nabble.com/Importing-MySql-dumped-db-into-pgadmin-tp5780055p5780061.html
> Sent from the PostgreSQL - sql mailing list archive at Nabble.com.
>
>


-- 
Adrian Klaver
adrian.klaver@gmail.com