mysqld.cnf 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # For advice on how to change settings please see
  2. # http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
  3. [client]
  4. default-character-set = utf8
  5. [mysqld]
  6. port = 3306
  7. default-storage-engine = INNODB
  8. character-set-server = utf8
  9. collation-server = utf8_general_ci
  10. max_connections = 1024
  11. max_allowed_packet = 64M
  12. lower_case_table_names = 1
  13. innodb_buffer_pool_size = 256M
  14. join_buffer_size = 256M
  15. read_rnd_buffer_size = 16M
  16. sort_buffer_size = 16M
  17. sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
  18. #
  19. # Remove leading # and set to the amount of RAM for the most important data
  20. # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
  21. # innodb_buffer_pool_size = 128M
  22. #
  23. # Remove leading # to turn on a very important data integrity option: logging
  24. # changes to the binary log between backups.
  25. # log_bin
  26. #
  27. # Remove leading # to set options mainly useful for reporting servers.
  28. # The server defaults are faster for transactions and fast SELECTs.
  29. # Adjust sizes as needed, experiment to find the optimal values.
  30. # join_buffer_size = 128M
  31. # sort_buffer_size = 2M
  32. # read_rnd_buffer_size = 2M
  33. datadir=/var/lib/mysql
  34. socket=/var/lib/mysql/mysql.sock
  35. # Disabling symbolic-links is recommended to prevent assorted security risks
  36. symbolic-links=0
  37. #general_log=on
  38. #general_log_file=/var/log/mysqld/mysqld.general.log
  39. pid-file=/var/run/mysqld/mysqld.pid