Tool for shifting tables from Mysql to Postgresql

Dear all,

I want to convert some tables from Mysql database to Postgresql Database
in Linux Systems ( Ubuntu-10.4, CentOS ).

Can someone Please tell me tool for it that makes it easier.

I am able to done it through FW tools in Windows System but i want to
achieve it in Linux ( CentOS ) System.

I researched a lot & tried below steps :

1. mysqldump --compatible=postgresql wiki20100130 >
/hdd4-1/wiki20100130_mysql108feb22.sql

2. sed "s/\\\'/\'\'/g" wiki20100130_mysql108feb22.sql

3. bin/psql -Upostgres wiki20100130 < /hdd4-1/wiki20100130_mysql108feb22.sql

invalid byte sequence for encoding "UTF8": 0xe3ba27
HINT: This error can also happen if the byte sequence does not match
the encoding expected by the server, which is controlled by
"client_encoding".
ERROR: invalid byte sequence for encoding "UTF8": 0xee6c65
HINT: This error can also happen if the byte sequence does not match
the encoding expected by the server, which is controlled by
"client_encoding".
ERROR: invalid byte sequence


I think a tool would ease that work.

Thanks & best Regards,

Adarsh Sharma

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2 [at] m.gmane.org
Adarsh Sharma [ Di, 01 März 2011 11:27 ] [ ID #2055972 ]

Re: Tool for shifting tables from Mysql to Postgresql

2011/3/1 Adarsh Sharma <adarsh.sharma [at] orkash.com>:
> Dear all,
>
> I want to convert some tables from Mysql database to Postgresql Database =
in
> Linux Systems ( Ubuntu-10.4, CentOS ).
[...]
> invalid byte sequence for encoding "UTF8": 0xe3ba27
> HINT: =C2=A0This error can also happen if the byte sequence does not matc=
h the
> encoding expected by the server, which is controlled by "client_encoding"=
..
> ERROR: =C2=A0invalid byte sequence for encoding "UTF8": 0xee6c65
> HINT: =C2=A0This error can also happen if the byte sequence does not matc=
h the
> encoding expected by the server, which is controlled by "client_encoding"=
..
> ERROR: =C2=A0invalid byte sequence

This is not a MySQL-specific error. You are using a character set
encoding as if it were another. Please, check documentation for the
options to export and import database dumps such as:

<http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html#option_mysqldump_def=
ault-character-set>

--
Jaime Crespo
MySQL & Java Instructor
Software Developer
Warp Networks
<http://warp.es>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2 [at] m.gmane.o rg
Jaime Crespo [ Di, 01 März 2011 11:44 ] [ ID #2055973 ]

Re: Tool for shifting tables from Mysql to Postgresql

By default Postgresql database encoding in UTF8.

It seems to me by seeing error that database encoding in mysql is
different from it.


--
Cheers,
Dhaval Jaiswal




On 01/03/2011 3:57 PM, Adarsh Sharma wrote:
> Dear all,
>
> I want to convert some tables from Mysql database to Postgresql
> Database in Linux Systems ( Ubuntu-10.4, CentOS ).
>
> Can someone Please tell me tool for it that makes it easier.
>
> I am able to done it through FW tools in Windows System but i want to
> achieve it in Linux ( CentOS ) System.
>
> I researched a lot & tried below steps :
>
> 1. mysqldump --compatible=postgresql wiki20100130 >
> /hdd4-1/wiki20100130_mysql108feb22.sql
>
> 2. sed "s/\\\'/\'\'/g" wiki20100130_mysql108feb22.sql
>
> 3. bin/psql -Upostgres wiki20100130 <
> /hdd4-1/wiki20100130_mysql108feb22.sql
>
> invalid byte sequence for encoding "UTF8": 0xe3ba27
> HINT: This error can also happen if the byte sequence does not match
> the encoding expected by the server, which is controlled by
> "client_encoding".
> ERROR: invalid byte sequence for encoding "UTF8": 0xee6c65
> HINT: This error can also happen if the byte sequence does not match
> the encoding expected by the server, which is controlled by
> "client_encoding".
> ERROR: invalid byte sequence
>
>
> I think a tool would ease that work.
>
> Thanks & best Regards,
>
> Adarsh Sharma
>
<font Face='Arial' style='font-size:9pt'>This e-mail, and any attachments are strictly confidential and may also contain legally privileged information. It is intended for the addressee(s) only. If you are not the intended recipient, please do not print, copy, store or act in reliance on the e-mail or any of its attachments. Instead, please notify the sender immediately and then delete the e-mail and any attachments.

Unless expressly stated to the contrary, the views expressed in this e-mail are not necessarily the views of Enzen Global Solutions (P) Limited or any of its subsidiaries or affiliates (Group Companies), and the Group Companies, their directors, officers and employees makes no representation and accept no liability for the accuracy or completeness of this e-mail. You are responsible for maintaining your own virus protection and the Group Companies do not accept any liability for viruses. Enzen reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Enzen e-mail system.</font>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2 [at] m.gmane.org
Dhaval Jaiswal [ Di, 01 März 2011 12:48 ] [ ID #2055974 ]

Re: Tool for shifting tables from Mysql to Postgresql

--20cf307abea9847ff5049d6a802b
Content-Type: text/plain; charset=ISO-8859-1

Hi Adarsh,

There are very good tools out for migration from Mysql to PostgreSQL.
EnterpriseDB has the migration studio which will help to migrate Mysql to
PostgreSQL.

http://www.enterprisedb.com/solutions/mysql-vs-postgresql/ho w-to-move-from-mysql-to-postgresql

Best Regards,
Raghavendra
EnterpriseDB Corporation

On Tue, Mar 1, 2011 at 3:57 PM, Adarsh Sharma <adarsh.sharma [at] orkash.com>wrote:

> Dear all,
>
> I want to convert some tables from Mysql database to Postgresql Database in
> Linux Systems ( Ubuntu-10.4, CentOS ).
>
> Can someone Please tell me tool for it that makes it easier.
>
> I am able to done it through FW tools in Windows System but i want to
> achieve it in Linux ( CentOS ) System.
>
> I researched a lot & tried below steps :
>
> 1. mysqldump --compatible=postgresql wiki20100130 >
> /hdd4-1/wiki20100130_mysql108feb22.sql
>
> 2. sed "s/\\\'/\'\'/g" wiki20100130_mysql108feb22.sql
>
> 3. bin/psql -Upostgres wiki20100130 <
> /hdd4-1/wiki20100130_mysql108feb22.sql
>
> invalid byte sequence for encoding "UTF8": 0xe3ba27
> HINT: This error can also happen if the byte sequence does not match the
> encoding expected by the server, which is controlled by "client_encoding".
> ERROR: invalid byte sequence for encoding "UTF8": 0xee6c65
> HINT: This error can also happen if the byte sequence does not match the
> encoding expected by the server, which is controlled by "client_encoding".
> ERROR: invalid byte sequence
>
>
> I think a tool would ease that work.
>
> Thanks & best Regards,
>
> Adarsh Sharma
>
> --
> Sent via pgsql-general mailing list (pgsql-general [at] postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--20cf307abea9847ff5049d6a802b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Adarsh,<div><br></div><div>There are very good tools out for migration f=
rom Mysql to PostgreSQL. EnterpriseDB has the migration studio which will h=
elp to migrate Mysql to PostgreSQL.</div><div><br></div><div><a href=3D"htt=
p://www.enterprisedb.com/solutions/mysql-vs-postgresql/how-t o-move-from-mys=
ql-to-postgresql">http://www.enterprisedb.com/solutions/mysq l-vs-postgresql=
/how-to-move-from-mysql-to-postgresql</a></div>

<div><br></div><div>
<div>Best Regards,<br>Raghavendra<br>EnterpriseDB Corporation</div><div><br=
></div><div>On Tue, Mar 1, 2011 at 3:57 PM, Adarsh Sharma <span dir=3D"ltr"=
><<a href=3D"mailto:adarsh.sharma [at] orkash.com">adarsh.sharma [at] orkash.com</=
a>></span> wrote:</div>

<div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear all,<br>
<br>
I want to convert some tables from Mysql database to Postgresql Database in=
Linux Systems ( Ubuntu-10.4, CentOS ).<br>
<br>
Can someone Please tell me tool for it that makes it easier.<br>
<br>
I am able to done it through FW tools in Windows System but i want to achie=
ve it in Linux ( CentOS ) System.<br>
<br>
I researched a lot & tried below steps :<br>
<br>
1. mysqldump --compatible=3Dpostgresql wiki20100130 > /hdd4-1/wiki201001=
30_mysql108feb22.sql<br>
<br>
2. sed "s/\\\'/\'\'/g" wiki20100130_mysql108feb22.sql=
<br>
<br>
3. bin/psql -Upostgres wiki20100130 < /hdd4-1/wiki20100130_mysql108feb22=
..sql<br>
<br>
invalid byte sequence for encoding "UTF8": 0xe3ba27<br>
HINT: =A0This error can also happen if the byte sequence does not match the=
encoding expected by the server, which is controlled by "client_encod=
ing".<br>
ERROR: =A0invalid byte sequence for encoding "UTF8": 0xee6c65<br>
HINT: =A0This error can also happen if the byte sequence does not match the=
encoding expected by the server, which is controlled by "client_encod=
ing".<br>
ERROR: =A0invalid byte sequence<br>
<br>
<br>
I think a tool would ease that work.<br>
<br>
Thanks & best Regards,<br>
<br>
Adarsh Sharma<br><font color=3D"#888888">
<br>
-- <br>
Sent via pgsql-general mailing list (<a href=3D"mailto:pgsql-general [at] postgr=
esql.org" target=3D"_blank">pgsql-general [at] postgresql.org</a>)<br>
To make changes to your subscription:<br>
<a href=3D"http://www.postgresql.org/mailpref/pgsql-general" target=3D"_bla=
nk">http://www.postgresql.org/mailpref/pgsql-general</a><br>
</font></blockquote></div><br></div>

--20cf307abea9847ff5049d6a802b--
Raghavendra [ Di, 01 März 2011 12:57 ] [ ID #2055975 ]
Datenbanken » gmane.comp.db.mysql.general » Tool for shifting tables from Mysql to Postgresql

Vorheriges Thema: Newbie question: Association table and Foreign Key
Nächstes Thema: Question about performance