quarta-feira, 11 de outubro de 2017

Mysql: errno 12

Message error: InnoDB: mmap(xxx bytes) failed; errno 12


To resolve the Mysql error 12, follow this steps:

$ sudo dd if=/dev/zero of=/swapfile bs=1M count=1024
$ sudo mkswap /swapfile 
$ sudo swapon /swapfile

Add this line to /etc/fstab
/swapfile swap swap defaults 0 0

This last step is needed if you would like to automatically enable swap file after each reboot.