
my.cnf dosyasında internetten bulabileceğiniz hazır ayarlar dışında phpMyAdmin ile çalışan sorguları izleyerek optimizasyon yapmanız daha yararlı olacaktır.
Örneğin
Sorgularınızın bir kısmı ‘Query End ‘ durumunda bir süre kalıyorsa my.cnf dosyasına
innodb_flush_log_at_trx_commit = 0
komutunu girerek sorgularınızı hızlandırabilirsiniz.
Yine sorgularınızı inceleyerek sorguların ‘Waiting for query cache lock’ durumunda kaldığını gözlemliyorsanız my.cnf den
query_cache_size = 0 query_cache_type = 0
Komutlarıyla query caching i devre dışı bırakarak performansı gözlemlemelisiniz.
innodb_thread_concurrency = 0 #Mysql için oluşturulacak process Sayısı. # 0 olarak ayarlandığında mysql kendisi en iyi değeri ayarlayacaktır
innodb_flush_log_at_trx_commit = 1 # (Default) innodb_flush_log_at_trx_commit = 0 # Mysql crash ettiğinde son 1 saniyede yapılan işlemleri öncemsemiyorsanız performans artışı sağlar. innodb_flush_log_at_trx_commit = 2 # İşletim sistemi crash ettiğinde son 1 saniyede yapılan işlemleri öncemsemiyorsanız performans artışı sağlar.
skip-name-resolve # Mysql DNS çözümlemesi yapmaz ilk bağlantıda hız sağlar.
Diğer Ayarlar
Global Some Options
-------------------------------------------------------------------------
table_cache (default 64)
- Cache for storing open table handlers
- Increase this if Opened_tables is high
thread_cache (default 0)
- Number of  threads to keep for reuse
- Increase if threads_created is high
- Not useful if the client uses connection pooling
max_connections (default 100)
- The maximum allowed number of simultaneous connections
- Very important for tuning thread specific memory areas
- Each connection uses at least thread_stack of memory
◄◄ MyISAM Options ►►
-------------------------------------------------------------------------
Key_buffer_size (default 8Mb)
- Cache for storing indices
- Increase this to get better index handling
- Miss ratio (key_reads/key_read_requests) should be very low, 
                   at least < 0.03 (often < 0.01 is disarable)
myisam_sort_buffer_size (default 8Mb)
- Used when sorting indexes during REPAIR/ALTER TABLE
myisam_repait_threads (default 1)
- Used for bulk import and repairing
- Allows for repairing indexes in multiple threads
myisam_max_sort_file_size
- The max size of the file used while re-creating indexes
◄◄ InnoDB Optimization ►►
-------------------------------------------------------------------------
innodb_buffer_pool_size (default 8Mb)
- The memory buffer InnoDB uses to cache both data and indexes
- The bigger you set this the less disk i/o needed
- Can be set very hing (up to 80% on a dedicated system)
innodb_flush_log_at_trx_commit (default 1)
- 0 writes and sync's once per second (Not ACID)
- 1 forces sync to disk after every commit
- 2 write to disk every commit but only sync's about onpe per second
innodb_log_buffer_size (default 1Mb)
- Larger values allows for larger transactions to be logged in memory
- Sensible values range from 1M to 8M
innodb_log_file_size (default 5Mb)
- Size of each InnoDB redo log file
- Can be set up to buffer_pool_size
-------------------------------------------------------------------------
                                                 Thanks to Sonali Minocha
Yapılmaması Gerekenler Listesi: https://haydenjames.io/my-cnf-tuning-avoid-this-common-pitfall/
Tüm ayarlar global ayarlar değildir bazı ayarlar her bağlantı için ayrı ayrı yapılır.