查询innodb表时报错:ERROR 1286 (42000): Unknown table engine 'InnoDB'

查询innodb表时报错:ERROR 1286 (42000): Unknown table engine 'InnoDB'

mysql> select * from po_t limit 1;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    1
Current database: gsp

ERROR 1286 (42000): Unknown table engine 'InnoDB'
mysql>
mysql>

解决办法:
1.停止mysql
2.将innodb_data_home_dir对应目录下的ib_logfile* mv到/tmp或其他目录中
3.启动Mysql

再次查询,发现可以正常查询了:
mysql> select * from po_t limit 1;
+----------------+--------------------+--------+---------------------+----------------+------------------+---------------+---------------------+-------------+--------------+------------------+-----------+---------------------+---------------------+----------------+----------------------+-------------+---------+---------+
| PICKINGLIST_ID | RECEIVEMATERIAL_ID | STATUS | OUTTIME             | OUTWAREHOUSEER | PICKINGLIST_CODE | CREATEUSER_ID | CREATEDATE          | COMPANYCODE | WAREHOUSE_ID | PICKINGLIST_TYPE | IS_UPLOAD | ORDER_CREATED_DATE  | ORDER_RECEIVED_DATE | THROWORDERCODE | THROWRESERVATIONCODE | COMMITER_ID | EXETIME | VERSION |
+----------------+--------------------+--------+---------------------+----------------+------------------+---------------+---------------------+-------------+--------------+------------------+-----------+---------------------+---------------------+----------------+----------------------+-------------+---------+---------+
|              1 |                  1 | 4      | 2009-07-16 15:45:02 | NULL           | 2009071600001    |           441 | 2009-07-16 15:12:53 | 1010        |            1 |             NULL |         0 | 0000-00-00 00:00:00 | 0000-00-00 00:00:00 | NULL           | NULL                 |        NULL | NULL    |       0 |
+----------------+--------------------+--------+---------------------+----------------+------------------+---------------+---------------------+-------------+--------------+------------------+-----------+---------------------+---------------------+----------------+----------------------+-------------+---------+---------+
1 row in set (0.00 sec)

mysql>

你可能感兴趣的:(Mysql)