Portal Home > Knowledgebase > Articles Database > Need my.cnf suggestions
Need my.cnf suggestions
Posted by The Calling, 03-06-2012, 08:24 AM |
This is for my company server, need my.cnf optimization recommendations please.
MySQL 5.1
Cpanel 11
Centos 5.7 64 bit
4GB Memory
Current:
|
Posted by LVPSHosting, 03-06-2012, 09:13 AM |
Check this: https://github.com/rackerhacker/MySQLTuner-perl
|
Posted by The Calling, 03-06-2012, 10:18 AM |
Getting errors
root@server [~]# perl mysqltuner.pl
syntax error at mysqltuner.pl line 5, near "html>"
Unrecognized character \xC2 at mysqltuner.pl line 9.
|
Posted by barbus, 03-06-2012, 10:52 AM |
Check script. There should not be any HTML tags.
Or perform:
|
Posted by nehir, 03-06-2012, 11:10 AM |
OR
|
Posted by The Calling, 03-06-2012, 01:35 PM |
Does the script automatically tune, optimize the my.cnf file?
|
Posted by barbus, 03-06-2012, 01:36 PM |
It does not do anything, it just suggests.
|
Posted by The Calling, 03-06-2012, 01:51 PM |
I'm not quite understanding what it's telling me to do.
|
Posted by The Calling, 03-06-2012, 07:25 PM |
Would appreciate help on this please.
|
Posted by flocker, 03-07-2012, 03:29 AM |
Run OPTIMIZE TABLE to defragment tables for better performance
http://dev.mysql.com/doc/refman/5.1/...ize-table.html
Reduce your overall MySQL memory footprint for system stability
Reduce max-connections basically to get under the 100% memory usage
Adjust your join queries to always utilize indexes
Basically check your queries that do not use indexes
http://dev.mysql.com/doc/refman/5.0/...-using-indexes
join_buffer_size (> 1.0M, or always use indexes with joins)
Set it to join_buffer=2M, but do check for bad queries not using index as it says.
|
Posted by The Calling, 03-07-2012, 09:18 AM |
Ran log queries not using index, this is what I got
root@server [~]# mysqld --log-queries-not-using-indexes
120307 7:17:16 [Warning] '--skip-locking' is deprecated and will be removed in a future release. Please use '--skip-external-locking' instead.
120307 7:17:16 [Warning] '--safe-show-database' is deprecated and will be removed in a future release. Please use 'GRANT SHOW DATABASES' instead.
120307 7:17:16 [Warning] 'record_buffer' is deprecated and will be removed in a future release. Please use 'read_buffer_size' instead.
120307 7:17:16 [Warning] '--log_slow_queries' is deprecated and will be removed in a future release. Please use ''--slow_query_log'/'--slow_query_log_file'' instead.
120307 7:17:16 [ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
120307 7:17:16 [ERROR] Aborting
120307 7:17:16 [Note] mysqld: Shutdown complete
|
Posted by RRWH, 03-07-2012, 09:27 AM |
for another perspective on how your server is running find tuning-primer.sh and run it (google it) It will report and make another lot of suggestions.
|
Posted by SiteServing, 03-08-2012, 06:40 PM |
key_buffer seems too high for 4GB RAM.
|
Add to Favourites Print this Article
Also Read