Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: MySQL server runs out of memory or does not start  (Read 6218 times)

0 Members and 1 Guest are viewing this topic.

akhilt

  • Guest
MySQL server runs out of memory or does not start
« on: September 08, 2018, 10:35:36 am »
MySQL server runs out of memory or does not start

This article describes how to resolve a problem that may occur when you try to run MySQL server with a limited amount of memory.

You can resolve this problem by reducing the amount of memory that MySQL uses. To do this, modify the my.cnf configuration file and restart the MySQL server as follows:

1.  Use the nano or vi text editor to open the /etc/my.cnf file.

2.  Make the following changes to the my.cnf file. You may need to add some of these lines, or uncomment existing lines by removing the leading #.

Code: [Select]
set-variable = max_allowed_packet=1M
set-variable = thread_stack=64K
set-variable = table_cache=4
set-variable = sort_buffer=64K
set-variable = net_buffer_length=2K
set-variable = key_buffer_size=2095104
skip-innodb
skip-networking
skip-bdb
skip-ndbcluster

3. Save the changes to the my.cnf file.

4. Restart MySQL server. To do this, type the appropriate command for your Linux distribution:

 For CentOS and Fedora, type:

Code: [Select]
service mysqld restart
 For Debian and Ubuntu, type:

Code: [Select]
service mysql restart
Hope this article might help you someday,

Thank you!!  :)