Welcome 微信登录

首页 / 数据库 / MySQL / MySQL 5.5.32 配置文件优化详解

大纲
一、配置文件说明
  • 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 相关软件。
推荐阅读:详解MySQL配置的优化 http://www.linuxidc.com/Linux/2013-02/79726.htm一、配置文件说明
Mysql-5.5.32是Mysql5.5系列中最后一个版本,也是最后一个有配置文件的版本,为什么这么说呢,用过5.6的博友都知道,在mysql5.6中已经不提供配置文件选择,只有一个默认的配置文件,好了,我们今天说的是5.5.32这个版,就不和大家说5.6了,下面我们来具体说一下,mysql5.5.32中,提供可选的几个配置文件,
  • my-small.cnf
  • my-medium.cnf
  • my-large.cnf
  • my-huge.cnf
  • my-innodb-heavy-4G.cnf <!--EndFragment-->
下面我们就来分别的看一下^_^……
1.my-small.cnf
12345[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
12345[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
1234[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
1234[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
12345678[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)!6.总结从上面的说明我们可以出,基本是通过内存大小来选择mysql的配置文件的,那有博友会说了,现在的服务器动不动就是32G内存或者64G内存,甚至更大的内存,你那个配置文件最大只支持4G内存是不是有点小了,确认会有这样的问题,从mysql5.6以后,为了更大的发挥mysql的性能,已经去除了配置文件选择,只有一个默认的配置文件,里面只有一些???本配置,所有设置管理员都可以根据自己实际的需求进行自行设置,好了说了这么多,我们就来说一说,在企业的用的最多的my-innodb-heavy-4G.cnf配置文件!  
  • 1
  • 2
  • 3
  • 下一页
MySQL 用户与授权管理详解将MySQL默认datadir修改为自己想要的路径相关资讯      MySQL配置优化  MySQL 5.5.32  MySQL配置详解 
  • 详解MySQL配置的优化  (02/21/2013 17:29:27)
本文评论 查看全部评论 (0)
表情: 姓名: 字数