When I startup mysql on my unbuntu server I will get a message.

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
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

a few times I have got a message saying that the plugin is disabled.

I use webmin to configure it. Could that be a problem?


As CloudWeavers mentioned, you do not have enough memory available (including swap). If you do want to run in this configuration, either define an extra swap file like

dd if=/dev/zero of=/swap.img bs=1M count=512
mkswap -f /swap.img
echo '/swap.img none swap sw 0 0' >> /etc/fstab
swapon -a
sudo chown root:root /swap.img
sudo chmod 0600 /swap.img

for a 512MB swap file (that is, an actual file) on your root partition (which is actually a hack to get you going - this is not a best-practice configuration) OR lower your innodb_buffer_pool_size to a smaller value (again not recommended, this is an important tuning variable for the InnoDB engine and should not be changed light-heartedly)

sed -i 's/^.+innodb_buffer_pool_size.+/innodb_buffer_pool_size=32M/' /etc/my.cnf
service mysqld restart

Your issues is :

InnoDB: mmap(137363456 bytes) failed; errno 12

And, if you are on GNU/Linux, we can take for granted that:

Errno 12: ENOMEM 

It means that InnoDB initialization failed during memory mapping. You don't have enough memory available. I guess you don't have any swap defined (check with 'free -m') and you don't have 128MB free for InnoDB plugin?

This error automatically make the plugin go in 'disabled' and prevent you from using innodb tables.

Not the answer you're looking for? Browse other questions tagged or ask your own question.