ERROR 1556 (HY000) at line 57258: You can't use locks with log tables.
查到这一行内容如下:
/*!40000 ALTER TABLE `general_log` DISABLE KEYS */;
LOCK TABLES `general_log` WRITE;
UNLOCK TABLES;
/*!40000 ALTER TABLE `general_log` ENABLE KEYS */;
检查 binlog 是否有更新:
mysql> show variables like '%update%';
+-----------------------------------------+-------+
| Variable_name | Value |
+-----------------------------------------+-------+
| binlog_direct_non_transactional_updates | OFF |
| innodb_stats_auto_update | 1 |
| innodb_stats_update_need_lock | 1 |
| log_slave_updates | ON |
| low_priority_updates | OFF |
| sql_log_update | ON |
| sql_low_priority_updates | OFF |
| sql_safe_updates | OFF |
+-----------------------------------------+-------+
8 rows in set (0.00 sec)
如果架构是A->B->C 的话,B 中的log_slave_updates 必须为
ON
mysql> show variables like '%update%';
+-----------------------------------------+-------+
| Variable_name | Value |
+-----------------------------------------+-------+
| binlog_direct_non_transactional_updates | OFF |
| innodb_stats_auto_update | 1 |
| innodb_stats_update_need_lock | 1 |
| log_slave_updates | OFF |
| low_priority_updates | OFF |
| sql_log_update | ON |
| sql_low_priority_updates | OFF |
| sql_safe_updates | OFF |
+-----------------------------------------+-------+
8 rows in set (0.00 sec)
mysql>
./mysqlcheck --all-databases -auto-repair
-S/diska/channel_db/mysqldata/mysql.sock
130321 13:08:26 Percona XtraDB (http://www.percona.com) 1.1.8-20.1 started;
log sequence number 2195031638
130321 13:08:26 [ERROR] Fatal error: Can't open and lock privilege tables:
Table 'mysql.db' doesn't exist
130321 13:08:26 mysqld_safe mysqld from pid file
/diska/channel_db/mysqldata//SHANGH21-89-DX-DB.opi.com.pid ended
130321 13:10:01 mysqld_safe Starting mysqld daemon with databases from
/diska/channel_db/mysqldata/
130321 13:10:01 [Note] Flashcache bypass: disabled
130321 13:10:01 [Note] Flashcache setup error is : ioctl failed
130321 13:10:01 InnoDB: The InnoDB memory heap is disabled
130321 13:10:01 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130321 13:10:01 InnoDB: Compressed tables use zlib 1.2.3
130321 13:10:01 InnoDB: Initializing buffer pool, size = 2.0G
130321 13:10:01 InnoDB: Completed initialization of buffer pool
130321 13:10:01 InnoDB: highest supported file format is Barracuda.
130321 13:10:01 InnoDB: Waiting for the background threads to start
130321 13:10:02 Percona XtraDB (http://www.percona.com) 1.1.8-20.1 started;
log sequence number 2195031638
130321 13:10:02 [ERROR] Fatal error: Can't open and lock privilege tables:
Table 'mysql.db' doesn't exist
130321 13:10:02 mysqld_safe mysqld from pid file
/diska/channel_db/mysqldata//SHANGH21-89-DX-DB.opi.com.pid
ended
没有评论:
发表评论