去评论
dz插件网

各位有优化过的MySQL5.7配置文件吗?用在700MB小鸡上跑网站

左右不逢缘
2024/04/16 13:51:22
如题,各位MJJ有没有什么珍藏的优化过的mysql5.7 配置文件?求分享一波  

我自己也在网上搜索攒了一个配置文件,不知道是不是最好的   

纳了闷了,现在的小鸡配置都这么低,只能用来转发流量吗?

要不然市面上那些 500MB 内存的小 VPS ,或者什么网站空间是怎么部署的?


  1. [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 = 2Mskip-host-cacheskip-name-resolvedatadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.socksecure-file-priv=/var/lib/mysql-filesuser=mysql# Disabling symbolic-links is recommended to prevent assorted security riskssymbolic-links=0log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pidinnodb_buffer_pool_size=5Minnodb_log_buffer_size=256Kquery_cache_size=0max_connections=10key_buffer_size=8thread_cache_size=0host_cache_size=0innodb_ft_cache_size=1600000innodb_ft_total_cache_size=32000000# per thread or per operation settingsthread_stack=131072sort_buffer_size=32Kread_buffer_size=8200read_rnd_buffer_size=8200max_heap_table_size=16Ktmp_table_size=1Kbulk_insert_buffer_size=0join_buffer_size=128net_buffer_length=1Kinnodb_sort_buffer_size=64K#settings that relate to the binary log (if enabled)binlog_cache_size=4Kbinlog_stmt_cache_size=4Kperformance_schema = off