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? :(


2 Answers 2


I know this thread is old but today I also had to edit that file. The error message is already telling what happens. Is that if you try to edit the file you saw in that other post, the file is not really there. If you list the folder, you will see that it is in fact a symlink. In my case:

my.cnf -> /etc/alternatives/my.cnf

So, instead of sudoedit /etc/mysql/my.cnf you should edit the file that is really pointed out sudoedit /etc/alternatives/my.cnf


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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .