开发者

MySQL Error: "Unknown table engine 'InnoDBopt'"

I'm getting the following error on some code from an old app:

A Database Error Occurred
Error Number: 1286

Unknown table engine 'InnoDBopt'

INSERT INTO `sessions` (`session_id`, `ip_address`, `user_agent`, `last_activity`) VALUES ('2ef196aba7f060308be6b7bc1133671f', '127.0.0.1', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) Ap', 1290342372)

I'm using MySQL version 5.1.36. This app was developed a while ago, so most likely I jus开发者_运维问答t need to downgrade my MySQL version to run this? If so, please advise what version I need to run this.

Edit: To clarify, I had to copy my database from one mysql installation to another, so I copied everything inside `c:/mysql/data' to the other installation of MySQL, that's likely what's causing this issue.


Make sure the mysql user can write to /tmp. I got 'Unknown table engine InnoDB' after restore where /tmp was not writable for that user.


There is another reason why INNODB engine is absent from MySQL. If your innodb_buffer_pool_size variable is too high and MySQL can't allocate the buffer it will disable the INNODB engine.

You should see something like this in the error log :

140204 13:12:26  InnoDB: Initializing buffer pool, size = 4.9G
140204 13:12:26  InnoDB: Error: cannot allocate 5242896384 bytes of
InnoDB: memory with malloc! Total allocated memory
InnoDB: by InnoDB 36878736 bytes. Operating system errno: 12
InnoDB: Check if you should increase the swap file or
InnoDB: ulimits of your operating system.
InnoDB: On FreeBSD check you have compiled the OS with
InnoDB: a big enough maximum process size.
InnoDB: Note that in most 32-bit computers the process
InnoDB: memory space is limited to 2 GB or 4 GB.
InnoDB: We keep retrying the allocation for 60 seconds...
140204 13:13:26InnoDB: Fatal error: cannot allocate the memory for the buffer pool
140204 13:13:26 [ERROR] Plugin 'InnoDB' init function returned error.
140204 13:13:26 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

This error was logged on a server with 1GB of RAM while the buffer pool request 4.9G


As suggested by Pekka, there is no engine 'InnoDBopt'

Try show engines;

If mysql return something like

+------------+----------+----
| Engine | Support | ...
+------------+----------+----
| InnoDB | DISABLED | ...

Most likely engine innodb has been disabled.
Look for option skip-innodb in your mysql configuration (such as my.cnf),
comment out this option,
restart mysql daemon, it should fix


where is the table engine define? in my.cnf? check the spelling in my.cnf ... "opt" sounds like a path to a log file or something defined in the config file.


Run SHOW CREATE TABLE sessions and then run SHOW engines

You will see something like ENGINE=xyz at he end of the first command result

xyz has to be in the list returned by SHOW engines

Edit: To be more explicit: The result of SHOW CREATE TABLE sessions is somethig like:

Table: sessions Create Table: CREATE TABLE sessions ( ................ ) ENGINE=xyz

where xyz could be MyIssam , Innodb, etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜