By looking at error it seems that database encoding is different in mysql 
database. 
 
By default db encoding in PostgreSQL is UTF-8. You can set client_encoding by 
set client_encoding = <what you have in mysql>
 
You can check the Mysql database encoding using following command. 
show variables like "character_set_database"; 
 
--
Thanks & Regards
Dhaval Jaiswal 

________________________________

From: pgsql-general-ow...@postgresql.org on behalf of Adarsh Sharma
Sent: Tue 3/1/2011 3:57 PM
To: my...@lists.mysql.com
Cc: pgsql-general@postgresql.org
Subject: [GENERAL] 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

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


The information transmitted is intended only for the person or entity to which 
it is addressed and may contain confidential and/or privileged material. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon,this information by persons or entities other than the 
intended recipient is prohibited. 
If you received this in error, please contact the sender and delete the 
material from your computer. 
Microland takes all reasonable steps to ensure that its electronic 
communications are free from viruses. 
However, given Internet accessibility, the Company cannot accept liability for 
any virus introduced by this e-mail or any attachment and you are advised to 
use up-to-date virus checking software. 

Reply via email to