MySQL – Default /etc/mysql/my.cnf on Wheezy

MySQL

I try to optimize MySQL with mysqltuner but it seems like my my.cnf was never upated. there are lots of depricated warnings in /var/log/syslog

How can I get back the default configuration file so I can start optimizing from scatch?

Best Answer

Mysqltuner is a tool aimed at providing advice, not replacinf a DBA or editing the config file.

Question: Will MySQLTuner fix my slow MySQL server?

No. MySQLTuner is a read only script. It won't write to any configuration files, change the status of any daemons, or call your mother to wish her a happy birthday. It will give you an overview of your server's performance and make some basic recommendations about improvements that you can make after it completes. Make sure you read the warning above prior to following any recommendations.

You can find a default configuration file by installing the mysql-common package (on a different machine).

You can download the package with

apt-get download mysql-common

Then you will have the package in your current directory. For me, it is

mysql-common_5.5.46-0+deb8u1_all.deb

Check the contents with

dpkg --contents mysql-common_5.5.46-0+deb8u1_all.deb

and extract it to (let's say it exists) /tmp/mysql_wd/

dpkg --extract mysql-common_5.5.46-0+deb8u1_all.deb /tmp/mysql_wd

It will be in /tmp/mysql_wd/etc/mysql/my.cnf

Then, there are simple basic advices given by Peter from Percona, which can help you get started at https://www.percona.com/blog/2014/01/28/10-mysql-settings-to-tune-after-installation/

Sorry if I only provide a link here, this is not the matter of the topic (there is no specific question about that).

The subject is too vast to process here and you will have to take a good look at it yourself but I think I have answered your question.

Best regards!