// Configure the created empty file as a swap area # mkswap /swapfile
// Enable the swap area # swapon /swapfile
Verify the swap area
1 2 3 4 5
# free
total used free shared buff/cache available Mem: 1015472 833592 66456 1456 115424 54708 Swap: 1048572 491136 557436 ← Confirm that the Swap entry has been added
Restart mysql
1
# systemctl restart mysqld
Solution 2. Increase the innodb_buffer_pool_size allocation
Check the currently configured innodb_buffer_pool_size
1 2 3 4 5 6 7
$ mysql -u <user> -p<pass> <db> -e "SHOW VARIABLES LIKE 'innodb_buffer_pool_size'"