Optimizing MySQL

czotos

Verified User
Joined
Oct 19, 2007
Messages
210
I would like to optimize the MySQL configuration on my DirectAdmin server: CentOS 6 with MySQL 5.6

I am following this guide: http://help.directadmin.com/item.php?id=44

My current /etc/my.cnf file looks like this:

Code:
[mysqld]
local-infile=0
innodb_file_per_table

I would like to optimize MySQL to use the configuration file located here:

http://files.directadmin.com/services/all/mysql/my-huge-5.5.cnf

However, I need assistance with the innodb_file_per_table setting. I believe it can corrupt the database data if not setup correctly!

Please can someone post an entire my-huge-5.5.cnf file with all the enabled/disabled settings to match my existing /etc/my.cnf file so that I can avoid data corruption. I am not sure whether or not to use the innodb_file_per_table setting and where it needs to be placed.

Thank you.
 
Last edited:
Hello,

innodb_file_per_table if to enable for existing tables won't affect them. You'll need to dump/drop/restore tables/dbs in order to have advantages of innodb_file_per_table.

As for creating of my.cnf. The same effect you will get if you copy/paste any my.cnf from internet. No guarantees. The forums are NOT the right place to create such files imho. Nobody here knows anything about your server specifications. You'd much better use this: https://tools.percona.com/ and do not ask to write my.cnf here from those who's never seen your server from inside.
 
If the old my.cnf has innodb_file_per_table setting, then so too much the new my.cnf.
It goes anywhere in the [mysqld] section.

Order within that section does not matter, but just make sure it doesn't go in (for example) the [client] section, or other sections.

John
 
Back
Top