Home /Linux /Mysql server stops very frequently

Mysql server stops very frequently

This is steps for solution of dump database.
Seems that our droplets does’nt have enogh memory some times and mysql cant allocate what it needs and crash, so we need to create a swap space to help this.

Uset the following steps

dd if=/dev/zero of=/swap.dat bs=1024 count=512k
mkswap /swap.dat
swapon /swap.dat

Change the permission of swap.dat file

chmod 600 /swap.dat

Open the file fstab and , add the following to the end of /etc/fstab file

vim /etc/fstab
/swap.dat none swap sw 0 0

Then, edit the mysql config file

vim /etc/mysql/my.cnf

And add this under [mysqld]

innodb_buffer_pool_size=64M
service mysqld reload

Congratulation for resolve the issue.

One thought on “Mysql server stops very frequently”

  1. ajeet85
    October 10, 2016 at 2:25 pm

    great suggetion and its work for me .

Leave a Reply