# MySQL which small - huge .cnf



## hirohitosan (Feb 14, 2011)

Hi there. I'm planning to install Joomla on my server. I installed MySQL 5.1 and now I have to chose my.cnf. There are many example files
	
	



```
ls /usr/local/share/mysql/*.cnf
/usr/local/share/mysql/my-huge.cnf
/usr/local/share/mysql/my-innodb-heavy-4G.cnf
/usr/local/share/mysql/my-large.cnf
/usr/local/share/mysql/my-medium.cnf
/usr/local/share/mysql/my-small.cnf
```
My box has 4G of RAM and mysql is for Joomla!

Any advices which one to chose?

Thanks


----------



## SirDice (Feb 14, 2011)

They are just examples and should be treated as such. Run your database for a few days then run the MySQL tuning script. Adjust the parameters, let it run for a few days, then run the script again. Keep doing that until it performs as expected.


----------



## hirohitosan (Feb 14, 2011)

Thanks SirDice! In this case which one you suggest to copy to /usr/local/etc/my.cnf?


----------



## SIFE (Feb 14, 2011)

/usr/local/share/mysql/my-huge.cnf for very big sites, many visitors at day or at some time.
/usr/local/share/mysql/my-innodb-heavy-4G.cnf, I don't know about this.
/usr/local/share/mysql/my-large.cnf for big sites.
/usr/local/share/mysql/my-medium.cnf if you have acceptable number of visitor's.
/usr/local/share/mysql/my-small.cnf if you run it in local host and you use only for testing.
This configuration are made to be as template to start with it, you can modifier it at time.


> Thanks SirDice! In this case which one you suggest to copy to /usr/local/etc/my.cnf?


Depend in your number of visitors of yours, at start you can begin with small configuration later use another configuration if you want.


----------



## DutchDaemon (Feb 14, 2011)

Note: you don't *need* a /usr/local/etc/my.cnf. It doesn't need to exist.


----------



## SIFE (Feb 14, 2011)

> Note: you don't need a /usr/local/etc/my.cnf. It doesn't need to exist.


In this case how MySQL server read its configuration.


----------



## DutchDaemon (Feb 14, 2011)

It simply uses its built-in defaults.


----------



## hirohitosan (Feb 22, 2011)

Thanks! Finally I decided on my-medium.cnf.


----------



## FR (Mar 15, 2013)

DutchDaemon said:
			
		

> It simply uses its built-in defaults.



And where is those defaults located?


----------



## DutchDaemon (Mar 15, 2013)

[cmd=]mysql --help[/cmd] will show a list of variables at the end.


----------



## holms (Apr 19, 2013)

DutchDaemon said:
			
		

> It simply uses its built-in defaults.



*A*nd why the hell you should be happy with defaults? *I*'ve c*o*me here just to increase *the* connection limit, and actually *a* huge profile suits me more *be*cause *the database* goes down or goes out of connection limit.


----------



## kpa (Apr 19, 2013)

The discussion is not about being happy with the defaults but where they could be found if you need to look them up.


----------

