Home

zhangyiqun

Thoughts, stories and ideas.

Notes Blog Archives About
04 Sep 2009

Mysql ERROR 1062 (23000)

问题描述

使用zcat将mysql数据导入时

ERROR 1062 (23000): Duplicate entry ‘255’ for key 1

解决办法

解压出sql语句,进入mysql

use db;

source yoursqlfile;

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

……

解决从数据库与主无法同步的问题

问题描述

090907  9:49:12 [ERROR] Error reading packet from server: Misconfigured master – server id was not set ( server_errno=1236)

090907  9:49:12 [ERROR] Got fatal error 1236: ‘Misconfigured master – server id was not set’ from master when reading data from binary log

解决办法

为master添加server-id

与本文有关的日志

MySQL 备份恢复同步一条龙 {.post}

Notes Blog Archives About