一、数据库配置文件

数据库配置文件是很一个很强大的功能,这是数据库管理员经常需要关注的配置文件。

  • my.ini  #这是在windows下的配置文件名称。
  • my.conf  #这是在linux下的配置文件名称。

my.ini原文件代码:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL. [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 # These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = ..... # 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 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

my.ini修改后代码:

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL. [mysqld]
character-set-server = utf8
# 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 # These are commonly set, remove the # and set as required.
basedir = c:/mysql
datadir = c:/mysql/data
port = 3306
# 这是主从数据库的ID,所以这个ID不能重复
server_id = 1 # 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 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

  

mysql数据库配置文件的更多相关文章

  1. Mysql数据库配置文件my.cnf详解

    basedir = path 使用给定目录作为根目录(安装目录). character-sets-dir = path 给出存放着字符集的目录. datadir = path 从给定目录读取数据库文件 ...

  2. liunx环境下的mysql数据库配置文件my.conf内的参数含义

    [client]port = 3306socket = /tmp/mysql.sock [mysqld]port = 3306socket = /tmp/mysql.sock basedir = /u ...

  3. MySQL数据库---配置文件及数据文件

    1.主配置文件 #/usr/local/mysql/bin/mysqld --verbose --help |grep -A 1 'Default options' #cat /etc/my.cnf ...

  4. 通用php与mysql数据库配置文件

    <?php header("content-type:text/html;charset = utf-8"); $dblink = mysql_connect("l ...

  5. MYSQL数据库的优化

    我们究竟应该如何对MySQL数据库进行优化?下面我就从MySQL对硬件的选择.MySQL的安装.my.cnf的优化.MySQL如何进行架构设计及数据切分等方面来说明这个问题. 服务器物理硬件的优化 在 ...

  6. [转]MySQL数据库的优化-运维架构师必会高薪技能,笔者近六年来一线城市工作实战经验

    本文转自:http://liangweilinux.blog.51cto.com/8340258/1728131 年,嘿,废话不多说,下面开启MySQL优化之旅! 我们究竟应该如何对MySQL数据库进 ...

  7. MySQL数据库的优化-运维架构师必会高薪技能,笔者近六年来一线城市工作实战经验

    原文地址:http://liangweilinux.blog.51cto.com/8340258/1728131 首先在此感谢下我的老师年一线实战经验,我当然不能和我的老师平起平坐,得到老师三分之一的 ...

  8. 优化mysql数据库的几个步骤

    析问题: 1. 开启慢查询日志. 这个步骤就是为了记录慢查询的sql,为下个步骤做准备,此步骤相关的知识点有如下: 1. show variables like '%slow_query_log%'; ...

  9. MySQL 之 MySQL数据库的优化

    服务器物理硬件的优化 在挑选硬件服务器时,我们应该从下面几个方面着重对MySQL服务器的硬件配置进行优化,也就是说将项目中的资金着重投入到如下几处: 1.磁盘寻道能力(磁盘I/O),我们现在用的都是S ...

随机推荐

  1. java ee 中 Jsp 页面的定时的跳转(数字倒数)

    java ee 中 Jsp 页面的定时的跳转,实现数字倒计时跳转固定页面 1,Servlet类  RefreshServlet类实现 package org.servlet; import java. ...

  2. Formtastic: Forms Made Crazy Easy for Rails Developers

    Formtastic is a Rails plugin by Justin French that aims to take the headaches out of building forms ...

  3. tomcat shutdown.sh结束不了,Could not contact localhost:8005

    使用./shutdown.sh关闭Tomcat,有时会关闭成功,有时会出现关闭错误; Jul 06, 2017 10:57:37 AM org.apache.catalina.startup.Cata ...

  4. EventProxy流程控制

    EventProxy流程控制 EventProxy是一个通过控制事件触发顺序来控制业务流程的工具. 1. 利用事件机制解耦复杂业务逻辑2. 移除被广为诟病的深度callback嵌套问题3. 将串行等待 ...

  5. sgsdg

    wrjow we wetwer werwer werwer werqw qweqwrq qwrqwr @ApiOperation("根据条件分页查询试卷") @ApiRespons ...

  6. poj 1849 Two 树形dp

    Two Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 1092   Accepted: 527 Description Th ...

  7. zookeeper 选举

    选举概述: 1.启动时期的选举 所有的服务器状态为 LOOKING. 1.1.每个Server 会投出一票(投票规则为:SID.ZXID ,即 服务器ID 和 最大事务ID). 1.2.处理选票 (A ...

  8. js 数组删除元素,并获得真实长度

    前言:js数组删除一般采用数组的 splice 方法和 delete 方法,但是采用 delete 方法后直接数组.kength 来获取数组长度是获取不了真实长度的,下面详细讲解一下. 一.splic ...

  9. Python Django Ajax 传递列表数据

    function getTableContent(node) { event.preventDefault(); var tr = node.parentNode.parentNode; var id ...

  10. 原 java调整数据顺序是奇数位于偶数的前面(思路与实现)

    题目描述 输入一个整数数组,实现一个函数来调整该数组中数字的顺序,使得所有的奇数位于数组的前半部分,所有的偶数位于位于数组的后半部分,并保证奇数和奇数,偶数和偶数之间的相对位置不变. 思路一: 首先这 ...