一、配置文件说明
my-small.cnf
my-medium.cnf
my-large.cnf
my-huge.cnf
my-innodb-heavy-4G.cnf
二、详解 my-innodb-heavy-4G.cnf
三、配置文件优化
注:环境说明,CentO5.5 x86_64+MySQL-5.5.32 相关软件下载:http://yunpan.cn/QtaCuLHLRKzRq
一、配置文件说明
Mysql-5.5.49是Mysql5.5系列中最后一个版本,也是最后一个有配置文件的版本,为什么这么说呢,用过5.6的博友都知道,在mysql5.6中已经不提供配置文件选择,只有一个默认的配置文件,好了,我们今天说的是5.5.49这个版,就不和大家说5.6了,下面我们来具体说一下,mysql5.5.49中,提供可选的几个配置文件,
my-small.cnf
my-medium.cnf
my-large.cnf
my-huge.cnf
my-innodb-heavy-4G.cnf
下面我们就来分别的看一下^_^……
1.my-small.cnf
[root@mysql support-files]# vim my-small.cnf# Example MySQL config file for small systems.# This is for a system with little memory (<= 64M) where MySQL is only used # from time to time and it's important that the mysqld daemon # doesn't use much resources. |
这是my-small.cnf配置文件中开头的简介,它说明了,这个配置文件是在内存小于等于64M时使用的,小型数据库系统,目的是不占更多的系统资源!
2.my-medium.cnf
[root@mysql support-files]# vim my-medium.cnf# Example MySQL config file for medium systems.# This is for a system with little memory (32M - 64M) where MySQL plays # an important part, or systems up to 128M where MySQL is used together with # other programs (such as a web server) |
这个配置文件是中型数据系统使用,内存在128M左右!
3.my-large.cnf
[root@mysql support-files]# vim my-large.cnf# Example MySQL config file for large systems. # This is for a large system with memory = 512M where the system runs mainly # MySQL. |
这个配置文件是大型数据库系统使用,内存在512M左右!
4.my-huge.cnf
[root@mysql support-files]# vim my-huge.cnf# Example MySQL config file for very large systems. # This is for a large system with memory of 1G-2G where the system runs mainly # MySQL. |
这个配置文件是巨型数据库系统使用,内存在1G-2G左右!
5.my-innodb-heavy-4G.cnf
[root@mysql support-files]# vim my-innodb-heavy-4G.cnf#BEGIN CONFIG INFO #DESCR: 4GB RAM, InnoDB only, ACID, few connections, heavy queries #TYPE: SYSTEM #END CONFIG INFO# This is a MySQL example config file for systems with 4GB of memory # running mostly MySQL using InnoDB only tables and performing complex # queries with few connections. |
这个配置文件主要作用是,支持4G内存,支持InnoDB引擎,支持事务(ACID)等特性所使用!
说明:ACID,指数据库事务正确执行的四个基本要素的缩写。包含:原子性(Atomicity)、一致性(Consistency)、隔离性(Isolation)、持久性(Durability)!
新闻热点
疑难解答