Hi All,
I've been googling all morning trying to find info on how to do a
mysqldump of a utf8 encoded database from which I can restore without
corrupting all the non ascii characters. If anyone has any pointers
on this, I'd be most grateful.
Here is my setup. I am building a ruby on rails app and all the data
is being entered from that application. The data is displayed fine if
when it hasn't undergone a backup with msyqldump. I'm using mysql
server 4.1.16 on Fedora Core 4. Here is an example show create table
on one of the relevant tables:
artists | CREATE TABLE `artists` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) default NULL,
`biography` text,
`created_at` datetime default NULL,
`updated_at` datetime default NULL,
`sort_name` varchar(255) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
The restored table has the same show create table definition. I've
used enca on the dump file to see if it's been encoded properly:
enca -L none testdump1.sql
Universal transformation format 8 bits; UTF-8
So that seems to be in order. Here's the top of the dump file:
1 -- MySQL dump 10.9
2 --
3 -- Host: localhost Database: alienrails_production
4 -- ------------------------------------------------------
5 -- Server version 4.1.16
6
7 /*!40101 SET
@OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8 /*!40101 SET
@OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9 /*!40101 SET
@OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10 /*!40101 SET NAMES utf8 */;
11 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS,
UNIQUE_CHECKS=0 */;
12 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0 */;
13 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE,
SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
14 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
15
16 --
17 -- Table structure for table `artist_images`
18 --
Obviously I'm mussing something, but I have no idea what.
Thanks in advance,
Sean
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]