当我在我的 unbuntu 服务器上启动 mysql 时,我会收到一条消息。
121122 17:39:37 [Note] Plugin 'FEDERATED' is disabled.
121122 17:39:37 InnoDB: The InnoDB memory heap is disabled
121122 17:39:37 InnoDB: Mutexes and rw_locks use GCC atomic builtins
121122 17:39:37 InnoDB: Compressed tables use zlib 1.2.3.4
121122 17:39:37 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
121122 17:39:37 InnoDB: Completed initialization of buffer pool
121122 17:39:37 InnoDB: Fatal error: cannot allocate memory for the buffer pool
121122 17:39:37 [ERROR] Plugin 'InnoDB' init function returned error.
121122 17:39:37 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
121122 17:39:37 [ERROR] Unknown/unsupported storage engine: InnoDB
121122 17:39:37 [ERROR] Aborting
121122 17:39:37 [Note] mysqld: Shutdown complete
Run Code Online (Sandbox Code Playgroud)
有几次我收到一条消息,说该插件已被禁用。
我使用 webmin 来配置它。这可能是个问题吗?
小智 3
您的问题是:
InnoDB: mmap(137363456 bytes) failed; errno 12
Run Code Online (Sandbox Code Playgroud)
而且,如果您使用的是 GNU/Linux,我们可以理所当然地认为:
Errno 12: ENOMEM
Run Code Online (Sandbox Code Playgroud)
说明内存映射时InnoDB初始化失败。您没有足够的可用内存。我猜你没有定义任何交换(用“free -m”检查)并且你没有 128MB 的空闲空间用于 InnoDB 插件?
此错误会自动使插件进入“禁用”状态并阻止您使用 innodb 表。