Monday, April 2, 2018

mysql daemon failed to start in amazon linux

mysql daemon failed to start in amazon linux.

I could see that all the configurations and everything is fine and it was working fine.

Solution:

Issue was with there is not free swap memory on the server. You need to add manually a swap file to fix the issue.

Login to the server

# dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
# chown root:root /swapfile1
# chmod 0600 /swapfile1
# mkswap /swapfile1
# swapon /swapfile1
# vi /etc/fstab
Add the following at the last
/swapfile1 none swap sw 0 0
Save the file
$ free -m


Now try to start mysqld service.

No comments:

Post a Comment