my.cnf 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. # The following options will be passed to all MySQL clients
  2. [client]
  3. #password= your_password
  4. port= 3306
  5. socket= /run/mysqld/mysqld.sock
  6. [mysql]
  7. character-sets-dir=/usr/share/mysql/charsets
  8. default-character-set=utf8
  9. [mysqladmin]
  10. character-sets-dir=/usr/share/mysql/charsets
  11. default-character-set=utf8
  12. [mysqlcheck]
  13. character-sets-dir=/usr/share/mysql/charsets
  14. default-character-set=utf8
  15. [mysqldump]
  16. character-sets-dir=/usr/share/mysql/charsets
  17. default-character-set=utf8
  18. [mysqlimport]
  19. character-sets-dir=/usr/share/mysql/charsets
  20. default-character-set=utf8
  21. [mysqlshow]
  22. character-sets-dir=/usr/share/mysql/charsets
  23. default-character-set=utf8
  24. [myisamchk]
  25. character-sets-dir=/usr/share/mysql/charsets
  26. [myisampack]
  27. character-sets-dir=/usr/share/mysql/charsets
  28. # use [safe_mysqld] with mysql-3
  29. [mysqld_safe]
  30. err-log= /var/log/mysql/mysql.err
  31. # add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations
  32. [mysqld]
  33. character-set-server= utf8
  34. user = mysql
  35. port = 3306
  36. socket = /run/mysqld/mysqld.sock
  37. pid-file = /run/mysqld/mysqld.pid
  38. log-error = /var/log/mysql/mysqld.err
  39. basedir = /usr
  40. datadir = /var/lib/mysql
  41. skip-external-locking
  42. key_buffer = 16M
  43. max_allowed_packet = 4M
  44. table_open_cache = 400
  45. sort_buffer_size = 512K
  46. net_buffer_length = 16K
  47. read_buffer_size = 256K
  48. read_rnd_buffer_size = 512K
  49. myisam_sort_buffer_size = 8M
  50. lc_messages_dir = /usr/share/mysql
  51. #Set this to your desired error message language
  52. lc_messages = en_US
  53. # security:
  54. # using "localhost" in connects uses sockets by default
  55. # skip-networking
  56. bind-address = 127.0.0.1
  57. log-bin
  58. #log-bin = mysqld-bin
  59. server-id = 1
  60. # point the following paths to different dedicated disks
  61. tmpdir = /tmp/
  62. #log-update = /path-to-dedicated-directory/hostname
  63. # you need the debug USE flag enabled to use the following directives,
  64. # if needed, uncomment them, start the server and issue
  65. # #tail -f /tmp/mysqld.sql /tmp/mysqld.trace
  66. # this will show you *exactly* what's happening in your server ;)
  67. #log = /tmp/mysqld.sql
  68. #gdb
  69. #debug = d:t:i:o,/tmp/mysqld.trace
  70. #one-thread
  71. # uncomment the following directives if you are using BDB tables
  72. #bdb_cache_size = 4M
  73. #bdb_max_lock = 10000
  74. # the following is the InnoDB configuration
  75. # if you wish to disable innodb instead
  76. # uncomment just the next line
  77. #skip-innodb
  78. #
  79. # the rest of the innodb config follows:
  80. # don't eat too much memory, we're trying to be safe on 64Mb boxes
  81. # you might want to bump this up a bit on boxes with more RAM
  82. innodb_buffer_pool_size = 128M
  83. #
  84. # i'd like to use /var/lib/mysql/innodb, but that is seen as a database :-(
  85. # and upstream wants things to be under /var/lib/mysql/, so that's the route
  86. # we have to take for the moment
  87. #innodb_data_home_dir = /var/lib/mysql/
  88. #innodb_log_arch_dir = /var/lib/mysql/
  89. #innodb_log_group_home_dir = /var/lib/mysql/
  90. # you may wish to change this size to be more suitable for your system
  91. # the max is there to avoid run-away growth on your machine
  92. innodb_data_file_path = ibdata1:10M:autoextend:max:128M
  93. # we keep this at around 25% of of innodb_buffer_pool_size
  94. # sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size)
  95. innodb_log_file_size = 48M
  96. # this is the default, increase it if you have very large transactions going on
  97. innodb_log_buffer_size = 8M
  98. # this is the default and won't hurt you
  99. # you shouldn't need to tweak it
  100. innodb_log_files_in_group=2
  101. # see the innodb config docs, the other options are not always safe
  102. innodb_flush_log_at_trx_commit = 1
  103. innodb_lock_wait_timeout = 50
  104. innodb_file_per_table
  105. # Uncomment this to get FEDERATED engine support
  106. #plugin-load=federated=ha_federated.so
  107. loose-federated
  108. [mysqldump]
  109. quick
  110. max_allowed_packet = 16M
  111. [mysql]
  112. # uncomment the next directive if you are not familiar with SQL
  113. #safe-updates
  114. [isamchk]
  115. key_buffer = 20M
  116. sort_buffer_size = 20M
  117. read_buffer = 2M
  118. write_buffer = 2M
  119. [myisamchk]
  120. key_buffer = 20M
  121. sort_buffer_size = 20M
  122. read_buffer = 2M
  123. write_buffer = 2M
  124. [mysqlhotcopy]
  125. interactive-timeout
  126. [mariadb]