- 论坛徽章:
- 0
|
本帖最后由 也弹吉他 于 2010-11-11 11:08 编辑
大家好,我的主从复制报错....
请各位指教!
Master 是一个很老的项目的数据库了,版本 5.0.18-log,我正在弄一个Slave,也是编译的这个版本的
最近在Master上启动了- server-id = 1
- log-bin = mysql-bin
- expire_logs_days = 10
- max-relay-log-size = 128M
复制代码 在Slave 上启动了- server-id = 2
- log-bin = mysql-bin
- expire_logs_days = 10
- max-relay-log-size = 128M
复制代码 [/code]
复制账号授权,change master to .... 也都OK了,
我把master 的 库dump 出来,导入到 slave 中,
启动slave, 可是发现错误了- mysql> show slave status\G;
- *************************** 1. row ***************************
- Slave_IO_State: Waiting for master to send event
- Master_Host: 192.168.253.80
- Master_User: rep
- Master_Port: 3306
- Connect_Retry: 60
- Master_Log_File: mysql-bin.000010
- Read_Master_Log_Pos: 51409317
- Relay_Log_File: server12-relay-bin.000002
- Relay_Log_Pos: 19923
- Relay_Master_Log_File: mysql-bin.000005
- Slave_IO_Running: Yes
- Slave_SQL_Running: No
- Replicate_Do_DB:
- Replicate_Ignore_DB:
- Replicate_Do_Table:
- Replicate_Ignore_Table:
- Replicate_Wild_Do_Table:
- Replicate_Wild_Ignore_Table:
- Last_Errno: 1406
- Last_Error: Error 'Data too long for column 'operator' at row 1' on query. Default database: 'dealdate'. Query: 'insert into sys_log_new(operator,content,createtime,ip,logType,logName,status) values ('朱辰','用户名:朱辰对账号ID:0824840,角色ID:46605699,进行了停操作失败,喊话原因:下线时间0','2010-11-10 18:04:29','172.31.9.202',10590,'喊话封停失败',0)'
- Skip_Counter: 0
- Exec_Master_Log_Pos: 439068106
- Relay_Log_Space: 4347136267
- Until_Condition: None
- Until_Log_File:
- Until_Log_Pos: 0
- Master_SSL_Allowed: No
- Master_SSL_CA_File:
- Master_SSL_CA_Path:
- Master_SSL_Cert:
- Master_SSL_Cipher:
- Master_SSL_Key:
- Seconds_Behind_Master: NULL
- 1 row in set (0.00 sec)
- ERROR:
- No query specified
复制代码 现在是只要有汉字就,都报错,SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1 ; 也无济于事!
我在master 和 slave 上, show variables like '%char%'; 看到的都一样,都是latin1 my.cnf 没加字符参数;- mysql> show variables like '%char%';
- [code]
- +--------------------------+-------------------------------------+
- | Variable_name | Value |
- +--------------------------+-------------------------------------+
- | character_set_client | latin1 |
- | character_set_connection | latin1 |
- | character_set_database | latin1 |
- | character_set_results | latin1 |
- | character_set_server | latin1 |
- | character_set_system | utf8 |
- | character_sets_dir | /mysql/share/mysql/charsets/ |
- +--------------------------+-------------------------------------+
- 7 rows in set (0.00 sec)
复制代码 我能想到的区别是: 编译slave 的时候 ,多加了--with-extra-charsets=utf8,gb2312,gbk , 编译master 的时候没加,
请各位指教~~ 谢谢啊!~~~泪流满面啊!! |
|