Skip navigation links

MySQL Forums :: Character Sets, Collation, Unicode :: Backing up UTF-8 content using mysqldump


Advanced Search

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
Backing up UTF-8 content using mysqldump 23528 Tal Rotbart 01/24/2006 12:30PM
Re: Backing up UTF-8 content using mysqldump [ Solution ] 12307 Tal Rotbart 02/09/2006 11:06AM
Re: Backing up UTF-8 content using mysqldump [ Solution ] 10344 Mike Lischke 02/21/2006 03:45AM
Re: Backing up UTF-8 content using mysqldump 14559 Thomas Taylor 02/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.