您的位置:首页 > 其它

ERROR 1286 (42000): Unknown table engine ‘InnoDB’

2014-08-22 13:00 295 查看
在对mysql库进行导出表结构时,发现报错:

mysqldump:Got
Error: 1286: Unknown table engine 'InnoDB? when using LOCK TABLES


1

2

3

4

5

6

7

8

9

10

11

12

13

mysql>
show
engines;

+------------+---------+-----------------------------------------------------------+--------------+------+------------+

|
Engine
|
Support
|
Comment
|
Transactions
|
XA
|
Savepoints
|

+------------+---------+-----------------------------------------------------------+--------------+------+------------+

|
MRG_MYISAM
|
YES
|
Collection
of
identical
MyISAM
tables |
NO
|
NO
|
NO
|

|
CSV |
YES
|
CSV
storage
engine
|
NO
|
NO
|
NO
|

|
FEDERATED |
NO |
Federated
MySQL
storage
engine |
NULL
|
NULL
|
NULL
|

|
MyISAM
|
DEFAULT
|
Default
engine
as
of
MySQL
3.23
with
great
performance
|
NO
|
NO
|
NO
|

|
MEMORY
|
YES
|
Hash
based,
stored
in
memory,
useful
for
temporary
tables |
NO
|
NO
|
NO
|

+------------+---------+-----------------------------------------------------------+--------------+------+------------+

5
rows
in
set
(0.00
sec)

mysql>
show
innodb
status;

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

检查日志发现:

1

2

3

4

5

6

140402
12:32:15
InnoDB:
Initializing
buffer
pool,
size
=
1.5G

140402
12:32:15
InnoDB:
Completed
initialization
of
buffer
pool

InnoDB:
Error:
log
file
./ib_logfile0
is
of
different
size
0
5242880
bytes

InnoDB:
than
specified
in
the
.cnf
file
0
268435456
bytes!

140402
12:32:15
[ERROR]
Plugin
'InnoDB'
init
function
returned
error.

140402
12:32:15
[ERROR]
Plugin
'InnoDB'
registration
as
a
STORAGE
ENGINE
failed.

重启数据,将ib_logfile删除

1

2

3

4

#/etc/init.d/mysqld
stop

#cd /var/lib/mysql

#rm -rf
ib_logfile*

#/etc/init.d/mysqld
start

再次检查表引擎状态一切恢复正常。

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

mysql>
show
engines;

+------------+---------+--------------------------------------------------------------------------------------------+--------------+------+------------+

|
Engine

|
Support

|
Comment

|
Transactions
|
XA
|
Savepoints
|

+------------+---------+--------------------------------------------------------------------------------------------+--------------+------+------------+

|
MRG_MYISAM
|
YES

|
Collection
of
identical
MyISAM
tables

|
NO
|
NO
|
NO
|

|
CSV

|
YES

|
CSV
storage
engine

|
NO
|
NO
|
NO
|

|
FEDERATED
|
NO

|
Federated
MySQL
storage
engine

|
NULL
|
NULL
|
NULL
|

|
InnoDB

|
YES

|
Supports
transactions,
row-level
locking,
and
foreign
keys
|
YES
|
YES
|
YES
|

|
MEMORY

|
YES

|
Hash
based,
stored
in
memory,
useful
for
temporary
tables
|
NO
|
NO
|
NO
|

|
MyISAM

|
DEFAULT
|
Default
engine
as
of
MySQL
3.23
with
great
performance
|
NO
|
NO
|
NO
|

+------------+---------+------------------------------------------------------------+--------------+------+------------+

6
rows
in
set
(0.00
sec)

mysql>
show
innodb
status\G;

***************************
1.
row
***************************

Type:
InnoDB

Name:

Status:

=====================================

140402
13:51:30
INNODB
MONITOR
OUTPUT

=====================================

Per
second
averages
calculated
from
the
last
3
seconds

----------

SEMAPHORES

----------

OS
WAIT
ARRAY
INFO:
reservation
count
5,
signal
count
5

Mutex
spin
waits
0,
rounds
40,
OS
waits
0

RW-shared
spins
10,
OS
waits
5;
RW-excl
spins
0,
OS
waits
0

......

----------------------------

END
OF
INNODB
MONITOR
OUTPUT

============================

至此一切恢复正常
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: