0

I'm new with this, so sorry if this is a stupid question, but Mysql service keeps crashing. I found on Internet I should edit my.cnf file and add innodb_buffer_pool_size=64M, but when I try sudoedit /etc/mysql/my.cnf, I get sudoedit: /etc/mysql/my.cnf: editing symbolic links is not permitted.

Can somebody help me? I have Ubuntu 18.04. Where I should put that innodb buffer, and is that size okay? I can't find anything that is clear and helps. What else should I do to fix this? :(

-1

Try sudo nano /etc/mysql/my.cnf. You have the error editing symbolic links is not permitted just because /etc/mysql/my.cnf is only symbolic link to file /etc/alternatives/my.cnf. Don't use sudoedit, edit mysql.cnfwith nano or vim text editors which are able follow symbolic links.

My suggestion is to select innodb_buffer_pool_size about 80% of available installed RAM if your RAM less than 8 Gb and 90% if your RAM exeeds 8Gb. Everything depends on your definite situation in particular case. The rule: the larger innodb_buffer_pool_size the faster MySQL - is true.

Thus, assume you have 8Gb RAM, then 50% of RAM or 4Gb is right choice to start. If this configuration works well, increase this value step by step by 10% up to 80% of RAM. If you'll see that your swap has been used intensively enough, stop to increase this value and decrease it by resonable number.

Finally, open your my.cnf file with nano text editor:

sudo nano /etc/mysql/my.cnf

and add at the end of file new line:

innodb_buffer_pool_size = 4G

Save changes by pressing in nano CTRL+O -> y -> Enter and exit - CTRL+X. Restart mysql service to apply new mysql configuration:

sudo systemctl restart mysql.service

That's all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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