Mihanja80

my.cnf

May 4th, 2015
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.91 KB | None | 0 0
  1. [client]
  2. #password   = your_password
  3. port        = 3306
  4. socket      = /var/lib/mysql/mysql.sock
  5. default-character-set = utf8
  6.  
  7. # Here follows entries for some specific programs
  8.  
  9. # The MySQL server
  10. [mysqld]
  11. port        = 3306
  12. socket      = /var/lib/mysql/mysql.sock
  13. skip-external-locking
  14. key_buffer_size = 8M
  15. max_allowed_packet = 2M
  16. table_open_cache = 2000
  17. sort_buffer_size = 64K
  18. read_buffer_size = 256K
  19. read_rnd_buffer_size = 256K
  20. net_buffer_length = 4K
  21. thread_stack = 128K
  22.  
  23.  
  24. slow-query-log = 1
  25. log-queries-not-using-indexes = 0
  26. slow-query-log-file        = /var/log/mysql-slow.log
  27. long_query_time         = 2
  28.  
  29. log-error=/var/log/mysqld.log
  30. query_cache_size =64M
  31. query_cache_limit = 2M
  32. join_buffer_size = 256K
  33. thread_cache_size = 8
  34. max_connections = 100
  35. max_heap_table_size = 64M
  36. tmp_table_size = 64M
  37. bind-address          = 127.0.0.1
  38. tmpdir = /dev/shm
  39.  
  40.  
  41.  
  42. # Don't listen on a TCP/IP port at all. This can be a security enhancement,
  43. # if all processes that need to connect to mysqld run on the same host.
  44. # All interaction with mysqld must be made via Unix sockets or named pipes.
  45. # Note that using this option without enabling named pipes on Windows
  46. # (using the "enable-named-pipe" option) will render mysqld useless!
  47. #
  48. #skip-networking
  49. server-id   = 1
  50. character-set-server = utf8
  51.  
  52. # Uncomment the following if you want to log updates
  53. #log-bin=mysql-bin
  54.  
  55. # binary logging format - mixed recommended
  56. #binlog_format=mixed
  57.  
  58. # Causes updates to non-transactional engines using statement format to be
  59. # written directly to binary log. Before using this option make sure that
  60. # there are no dependencies between transactional and non-transactional
  61. # tables such as in the statement INSERT INTO t_myisam SELECT * FROM
  62. # t_innodb; otherwise, slaves may diverge from the master.
  63. #binlog_direct_non_transactional_updates=TRUE
  64.  
  65. # Uncomment the following if you are using InnoDB tables
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73. innodb_file_per_table
  74. innodb_flush_method=O_DIRECT
  75.  
  76. innodb_data_home_dir = /var/lib/mysql
  77. #innodb_data_file_path = ibdata1:10M:autoextend
  78. innodb_data_file_path = ibdata1:2000M;ibdata2:10M:autoextend
  79. innodb_log_group_home_dir = /var/lib/mysql
  80. # You can set .._buffer_pool_size up to 50 - 80 %
  81. # of RAM but beware of setting memory usage too high
  82. innodb_buffer_pool_size = 256M
  83. innodb_additional_mem_pool_size = 16M
  84. # Set .._log_file_size to 25 % of buffer pool size
  85. innodb_log_file_size = 64M
  86. innodb_log_buffer_size = 8M
  87. innodb_flush_log_at_trx_commit = 1
  88. innodb_lock_wait_timeout = 60
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96. #http://dba.stackexchange.com/questions/16341/how-do-you-remove-fragmentation-from-innodb-tables/16353#16353
  97.  
  98.  
  99.  
  100. [mysqldump]
  101. quick
  102. max_allowed_packet = 48M
  103. default-character-set = utf8
  104.  
  105. [mysql]
  106. no-auto-rehash
  107. # Remove the next comment character if you are not familiar with SQL
  108. #safe-updates
  109.  
  110. default-character-set = utf8
  111. [myisamchk]
  112. key_buffer_size = 8M
  113. sort_buffer_size = 8M
  114.  
  115. [mysqlhotcopy]
  116. interactive-timeout
Advertisement
Add Comment
Please, Sign In to add comment