The main system configuration file is /etc/my.cnf.
MySQL is extremely versatile and can be configured in many ways. Find the optimum configuration for your particular environment is an interative process. Starting with reasonable assumptions can speed up this process.
This exercise has five real life examples of my.cnf
file. They are all different because they are used in different situations.
my.cnf scripts;my.cnf scripts;my.cnf configuration scripts.long_query_time is set to the minimum.query_cache_limit is set to the default value.mysqld_safe has been set.max_connectionsmax_connect_errorsmax_user_connectionshost_cache_size entry and DNS lookup has been disabled.What other observations can you derive from this configuration file?
long_query_time is set to three seconds.table_cache is greater than the number of tables in the database.What other observations can you derive from this configuration file?
query_cache_size
key_buffer_size
key_buffer_size to at least a quarter, but no more than half, of the total amount of memory on the server..MYI files on the server).key_read_requests
key_reads
key_write_requests
key_writes
key_reads by the value of key_read_requests, the result should be less than 0.01.
key_writes by the value of key_write_requests, the result should be less than 1.
table_cache
open_tables at peak times.
table_cache if there is enough memory.
sort_buffer
sort_buffer is very useful for speeding up myisamchk operations, and when performing large numbers of sorts.
read_rnd_buffer_size
read_rnd_buffer_size is used after a sort, when reading rows in sorted order.
ORDER BY, upping this can improve performance.
key_buffer_size and table_cache, this buffer is allocated for each thread.
read_buffer_size.
thread_cache
InnoDB.What other observations can you derive from this configuration file?
InnoDB tables.my.cnf file.InnoDB.What changes could be made to this configuration file to improve performance?
my.cnf file to begin tuning your system.Congratulations! You have successfully examined my.cnf configuration scripts.