Re: Backing up UTF-8 content using mysqldump
Posted by: Thomas Taylor
Date: February 20, 2006 07:13PM

I, too, have had issues dealing with UTF-8 content in MySQL. However, I have been able to use the MySQL Command-Line Client to correctly run UTF-8 SQL scripts.

Using MySQLDump, make sure to use the '-r <filename>' option, instead of redirecting command-line output to a file ('> <filename>'). Redirection does not capture UTF characters properly, while the -r option does.
Example:
>mysqldump -r dbdump.sql

Using MySQL, source the sql script.
Example:
MySQL>source dbdump.sql

I have seen some issues when programs like Notepad or Wordpad have edited the SQL script between the dump and source.

Options: ReplyQuote


Subject
Views
Written By
Posted
26505
January 24, 2006 12:30PM
Re: Backing up UTF-8 content using mysqldump
17663
February 20, 2006 07:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.