|
如题,各位MJJ有没有什么珍藏的优化过的mysql5.7 配置文件?求分享一波
我自己也在网上搜索攒了一个配置文件,不知道是不是最好的
纳了闷了,现在的小鸡配置都这么低,只能用来转发流量吗?
要不然市面上那些 500MB 内存的小 VPS ,或者什么网站空间是怎么部署的?
- [mysqld]
- # Remove leading # and set to the amount of RAM for the most important data
- # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
- # innodb_buffer_pool_size = 128M
- #
- # Remove leading # to turn on a very important data integrity option: logging
- # changes to the binary log between backups.
- # log_bin
- #
- # Remove leading # to set options mainly useful for reporting servers.
- # The server defaults are faster for transactions and fast SELECTs.
- # Adjust sizes as needed, experiment to find the optimal values.
- # join_buffer_size = 128M
- # sort_buffer_size = 2M
- # read_rnd_buffer_size = 2M
- skip-host-cache
- skip-name-resolve
- datadir=/var/lib/mysql
- socket=/var/lib/mysql/mysql.sock
- secure-file-priv=/var/lib/mysql-files
- user=mysql
- # Disabling symbolic-links is recommended to prevent assorted security risks
- symbolic-links=0
- log-error=/var/log/mysqld.log
- pid-file=/var/run/mysqld/mysqld.pid
- innodb_buffer_pool_size=5M
- innodb_log_buffer_size=256K
- query_cache_size=0
- max_connections=10
- key_buffer_size=8
- thread_cache_size=0
- host_cache_size=0
- innodb_ft_cache_size=1600000
- innodb_ft_total_cache_size=32000000
- # per thread or per operation settings
- thread_stack=131072
- sort_buffer_size=32K
- read_buffer_size=8200
- read_rnd_buffer_size=8200
- max_heap_table_size=16K
- tmp_table_size=1K
- bulk_insert_buffer_size=0
- join_buffer_size=128
- net_buffer_length=1K
- innodb_sort_buffer_size=64K
- #settings that relate to the binary log (if enabled)
- binlog_cache_size=4K
- binlog_stmt_cache_size=4K
- performance_schema = off
复制代码 |
|