# Smallest MySQL install my.cnf ... Anyone?



## drmike (Jun 17, 2013)

Anyone using/have/recommend a very small my.cnf config for 128MB or less RAM server?

Know the topic has been punted around here and there.   Never bookmarked and/or tried one.  Today is one of those days to experiment.

Anyone have one?


----------



## SeriesN (Jun 17, 2013)

cp /usr/share/mysql/my-small.cnf /etc/my.cnf


----------



## drmike (Jun 17, 2013)

SeriesN said:


> cp /usr/share/mysql/my-small.cnf /etc/my.cnf


 

I don't have that sitting here now, but what is the small.cnf supposed to fit into RAM wise?


----------



## SeriesN (Jun 17, 2013)

This is default mysql config for smaller system. Supposed to be for system with ~64mb ram.



> # Example MySQL config file for small systems.
> 
> #
> 
> ...


----------



## vanarp (Jun 17, 2013)

You may want to try this:


$ cat my.cnf
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
bind-address = 127.0.0.1
key_buffer = 8M
max_allowed_packet = 1M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 4M
expire_logs_days = 10
max_binlog_size = 100M
skip-innodb
default-storage-engine=MyISAM
[mysqldump]
quick
quote-names
max_allowed_packet = 1M
[mysql]
[isamchk]
key_buffer = 8M
!includedir /etc/mysql/conf.d/

Anything in MBs can be reduced further if you see a problem. This is based on Minstall's config values. It is forced to use MyISAM instead of default InnoDB.


----------

