"neal" <[EMAIL PROTECTED]> wrote:
> I need to backup a mysql 4.1 database with UTF8 characters using InnoDB
> and then restore the backup on another machine
>
> I tried the following (same machine - Windows XP)
> mysqldump.exe -u root stp2 city > d1.sql                # backup
> stp2.city
> mysql.exe -u root t1 < d1.sql                                  #
> restore to t1.city
>
> The UTF8 data in city.City is garbage after the transfer , it is valid
> Thai language characters in the original.
>
> CREATE TABLE `city` (
> `city_id` int(11) NOT NULL default '0',
> `City` varchar(25) NOT NULL default '',
> `EngCity` varchar(25) NOT NULL default '',
> PRIMARY KEY  (`city_id`)
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Use --default-character-set option of mysqldump:
        http://www.mysql.com/doc/en/mysqldump.html


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to