`

mysql 5.6 conf

阅读更多

 

http://dev.mysql.com/doc/refman/5.6/en/option-files.html

http://dev.mysql.com/doc/refman/5.6/en/server-default-configuration-file.html

 

 

5.1.2.1. Changes to Server Defaults

Beginning with MySQL 5.6.6, several MySQL Server parameter defaults differ from the defaults in previous releases. The motivation for these changes is to provide better out-of-box performance and to reduce the need for database administrators to change settings manually.

In some cases, a parameter has a different fixed default value. In other cases, the server autosizes a parameter at startup using a formula based on other related parameters or server host configuration, rather than using a fixed value. For example, the setting for back_log is its previous default of 50, adjusted up by an amount proportional to the value of max_connections. The idea behind autosizing is that when the server has information available to make a decision about a parameter setting likely to be better than a fixed default, it will.

The following table summarizes changes to defaults. The Version column indicates when each default changed. For variables that are autosized, the main variable description provides additional detail about the sizing algorithm. See Section 5.1.4, “Server System Variables”, and Section 14.2.6, “InnoDB Startup Options and System Variables”. Any of these default settings can be overridden by specifying an explicit value at server startup.

Table 5.2. Changes to Server Defaults in MySQL 5.6

Parameter Old Default New Default Version
back_log 50 Autosized usingmax_connections 5.6.6
binlog_checksum NONE CRC32 5.6.6
--binlog-row-event-max-size 1024 8192 5.6.6
flush_time 1800 (on Windows) 0 5.6.6
host_cache_size 128 Autosized usingmax_connections 5.6.8
innodb_autoextend_increment 8 64 5.6.6
innodb_buffer_pool_instances 1 8 (platform dependent) 5.6.6
innodb_concurrency_tickets 500 5000 5.6.6
innodb_data_file_path ibdata1:10M:autoextend ibdata1:12M:autoextend 5.6.7
innodb_file_per_table 0 1 5.6.6
innodb_log_file_size 5MB 48MB 5.6.8
innodb_old_blocks_time 0 1000 5.6.6
innodb_open_files 300 Autosized usinginnodb_file_per_table,table_open_cache 5.6.6
innodb_stats_on_metadata ON OFF 5.6.6
join_buffer_size 128KB 256KB 5.6.6
max_allowed_packet 1MB 4MB 5.6.6
max_connect_errors 10 100 5.6.6
open_files_limit 0 Autosized usingmax_connections 5.6.8
performance_schema OFF ON 5.6.6
performance_schema_events_waits_history_long_size 10000 Autosized 5.6.6
performance_schema_events_waits_history_size 10 Autosized 5.6.6
performance_schema_max_cond_instances 1000 Autosized 5.6.6
performance_schema_max_file_instances 10000 Autosized 5.6.6
performance_schema_max_mutex_instances 1000000 Autosized 5.6.6
performance_schema_max_rwlock_instances 1000000 Autosized 5.6.6
performance_schema_max_table_handles 100000 Autosized 5.6.6
performance_schema_max_table_instances 50000 Autosized 5.6.6
performance_schema_max_thread_instances 1000 Autosized 5.6.6
query_cache_size 0 1M 5.6.8
query_cache_type ON OFF 5.6.8
secure_auth OFF ON 5.6.7
sql_mode '' (empty string) NO_ENGINE_SUBSTITUTION 5.6.6
sync_master_info 0 10000 5.6.6
sync_relay_log 0 10000 5.6.6
sync_relay_log_info 0 10000 5.6.6
table_definition_cache 400 Autosized usingtable_open_cache 5.6.8
table_open_cache 400 2000 5.6.8
thread_cache_size 0 Autosized usingmax_connections 5.6.8

 

In MySQL 5.6.6, the default for innodb_checksum_algorithm was changed from INNODB to CRC32. For compatibility reasons, the default was returned in 5.6.7 to INNODB.

 

5.1.2.2. Using a Sample Default Server Configuration File

As of MySQL 5.6.8, on Unix platforms, mysql_install_db creates a default option file named my.cnf in the base installation directory. This file is created from a template included in the distribution package named my-default.cnf. You can find the template in or under the base installation directory. When started usingmysqld_safe, the server uses my.cnf file by default. If my.cnf already exists, mysql_install_db assumes it to be in use and writes a new file named my-new.cnf instead.

With one exception, the settings in the default option file are commented and have no effect. The exception is that the file changes the sql_mode system variable from its default of NO_ENGINE_SUBSTITUTION to also includeSTRICT_TRANS_TABLES:

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

This setting produces a server configuration that results in errors rather than warnings for bad data in operations that modify transactional tables. See Section 5.1.7, “Server SQL Modes”.

The my-default.cnf template replaces the older sample option files formerly supplied with MySQL distributions (my-small.cnf, my-medium.cnf, my-large.cnf, and my-huge.cnf). As of MySQL 5.6.8, these older files are no longer distributed.

On Windows, MySQL Installer interacts with the user and creates a file named my.ini in the base installation directory as the default option file. If you install on Windows from a Zip archive, you can copy the my-default.ini template file in the base installation directory to my.ini and use the latter as the default option file.

Note

On Windows, the .ini or .cnf option file extension might not be displayed.

On any platform, after completing the installation process, you can edit the default option file at any time to modify the parameters used by the server. For example, to use a parameter setting in the file that is commented with a #character at the beginning of the line, remove the #, and modify the parameter value if necessary. To disable a To disable a setting, either add a # to the beginning of the line or remove it.

For additional information about option file format and syntax, see Section 4.2.3.3, “Using Option Files”.

Before MySQL 5.6.8, MySQL distributions include several sample option files that can be used as a basis for tuning the MySQL server. Look for files named my-small.cnf, my-medium.cnf, my-large.cnf, and my-huge.cnf, which are sample files for small, medium, large, and very large systems. On Windows, the extension is.ini rather than .cnf.

For a binary distribution, look for the sample files in or under your installation directory. If you have a source distribution, look in the support-files directory. To use a sample file as a base configuration file, rename a copy of it and place the copy in the appropriate location. Regarding names and appropriate location, see the general information provided in Section 4.2.3.3, “Using Option Files”.

 

 

 

分享到:
评论

相关推荐

    mysql5.6安装主从配置

    [root@localhost mysql-mult]# ./scripts/mysql_install_db --defaults-file=conf/3306my.cnf ``` 若出现错误提示,需要安装Perl模块: ```sh yum install perl-Data-Dumper ``` 启动MySQL服务: ```sh service ...

    CentOS7下源码编译配置Apache2.4+MySQL5.6+PHP71

    在本文中,我们将深入探讨如何在CentOS 7操作系统上通过源代码编译来安装Apache 2.4、MySQL 5.6和PHP 7.1。这个过程对于那些希望自定义软件配置或在没有预装包的环境中部署这些服务的系统管理员来说非常有用。 首先...

    docker拉取mysql5.6镜像并run一个容器,使用mysql服务

    docker run -p 3306:3306 --name mysql -v /media/mysql/conf:/etc/mysql/conf.d -v /media/mysql/logs:/logs -v /media/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6 ``` 这将创建一个名...

    Nginx1.12+PHP7.1+Mysql5.6.doc

    至于MySQL 5.6的安装,可以选择多种方法。一种是通过阿里云的教程链接进行,另一种是下载MySQL社区版的RPM包。这里展示第二种方法: 1. 下载MySQL 5.7.18 RPM包: ```bash wget ...

    服务器CentOs6.6+ JDK1.7+Tomcat7+MySQL5.6安装部署记录

    ### 服务器CentOs6.6+ JDK1.7+Tomcat7+MySQL5.6安装部署记录 #### 一、安装CentOs6.6 **步骤解析:** 1. **下载与烧录ISO镜像:** - 首先需要下载好Linux (CentOs6.6mini) 的ISO文件,通过U盘制作工具如“大白菜...

    centos7安装mysql5.6数据库简单教程-自己总结.DOCX

    在本文中,我们将深入探讨如何在CentOS 7系统上安装MySQL 5.6数据库。这是一个基础教程,适用于那些需要在该操作系统上部署MySQL数据库的IT专业人员。首先,我们先了解下CentOS 7和MySQL 5.6的基本信息。 CentOS 7...

    Linux下安装部署JDK7+Tomcat7+MySQL5.6+Redis3.07

    4. **MySQL5.6的安装及设置** 5. **Redis3.07的安装及设置** #### 2.2 操作系统的安装 - 下载CentOS 6.7版本的64位系统ISO镜像。 - 如果使用虚拟机安装,则在创建虚拟机时选择“自定义安装”并指定Workstation 8.0...

    windows2008R2 php5.4+apache2.4+mysql5.6配置包

    4. **MySQL5.6**:MySQL是一个关系型数据库管理系统,是Web应用的常用后端存储,因其高效和可靠而备受青睐。不过,由于文件大小问题,MySQL没有包含在这个压缩包中,需要单独下载和安装。 现在,让我们看看压缩包中...

    支持mysql5.6.19的canal版本

    MySQL 5.6.19是5.6系列的一个较早版本,它引入了一些重要的改进,如InnoDB存储引擎性能优化、并行复制、GTID(Global Transaction Identifier)等特性。这些特性可能需要Canal进行相应的适配才能正确处理相关的数据...

    H5农场牧场养殖鸡蛋理财鸡游戏运营源码,发财鸡搭建教程

    Nginx 1.18.0--MySQL 5.6.50--PHP-5.6--phpMyAdmin 5.0 //PHP7.0安装拓展fileinfo 创建站点,创建数据库并导入 1)设置网站伪静态 /thinkphp 2)数据库配置文件 \App\Common\Conf\config.php 3)修改商户信息...

    php5.6 + apache2.4+mysql5.7 配置

    将MySQL安装目录下的`bin`文件夹路径(如`C:\Program Files\MySQL\MySQL Server 5.6\bin`)添加到系统环境变量的`PATH`中。确保每个路径之间以分号(`;`)分隔。 #### 一、安装配置Apache2.4.18 1. **下载与解压** ...

    mha5.6安装包

    创建MHA Manager的配置文件,如`/etc/mha-manager.conf`,并设置MySQL连接信息、监控间隔、日志路径等相关参数。 5. **安装Node Manager**: MHA Manager需要在每个MySQL节点上运行Node Manager,也需要进行安装...

    php+mysql+nginx(linux)源码安装包集合

    Nginx的配置文件通常位于`/etc/nginx/nginx.conf`或类似路径。 总的来说,这个源码安装包集合提供了一套完整的工具,帮助开发者或系统管理员在Linux环境中搭建一个基于PHP、MySQL和Nginx的Web服务器,同时提供的...

    MySQ DBA基于windows和linux环境下MySQL5.7、5.6版本安装手册

    - **远程连接**:允许特定用户从远程地址访问,需修改`/etc/mysql/mysql.conf.d/mysqld.cnf`文件,打开`bind-address`并添加防火墙规则。 4. **Windows环境** - **安装前提**:确保系统符合最低硬件要求,关闭...

    centos7下部署apache2.4+mysql5.7.13+php5.6.pdf

    在本文中,我们将深入探讨如何在CentOS 7操作系统中部署Apache 2.4、MySQL 5.7.13和PHP 5.6。这是一个常见的Web开发环境配置,适用于搭建LAMP(Linux、Apache、MySQL、PHP)服务器。下面我们将按照步骤详细解释每个...

    Docker安装mysql

    我们可以在 Docker 的镜像仓库中找到不同 TAG 标签的版本,例如 MySQL 5.6、5.7、8.0 等。 二、配置 MySQL 在拉取镜像后,我们需要配置 MySQL 的目录。我们可以使用 mkdir 命令来创建目录。例如,我们可以使用以下...

    Dockerfile 安装php5.6镜像

    --with-mysql --with-mysqli \ --with-openssl --with-zlib --with-curl --with-gd \ --with-jpeg-dir --with-png-dir --with-iconv \ --enable-fpm --enable-zip --enable-mbstring && \ make -j 4 && make ...

    Centos5.6 x86_64下部署安装DRBD+Heartbeat+MySQL

    Centos5.6 x86_64 下部署安装 DRBD+Heartbeat+MySQL 服务器平台的实现方法 本文档旨在指导用户在 Centos5.6 x86_64 操作系统下部署安装 DRBD+Heartbeat+MySQL 服务器平台,实现高可用集群环境。通过本文档,用户...

Global site tag (gtag.js) - Google Analytics