mysql数据库配置文件
一、数据库配置文件
数据库配置文件是很一个很强大的功能,这是数据库管理员经常需要关注的配置文件。
- 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数据库配置文件的更多相关文章
- Mysql数据库配置文件my.cnf详解
basedir = path 使用给定目录作为根目录(安装目录). character-sets-dir = path 给出存放着字符集的目录. datadir = path 从给定目录读取数据库文件 ...
- liunx环境下的mysql数据库配置文件my.conf内的参数含义
[client]port = 3306socket = /tmp/mysql.sock [mysqld]port = 3306socket = /tmp/mysql.sock basedir = /u ...
- MySQL数据库---配置文件及数据文件
1.主配置文件 #/usr/local/mysql/bin/mysqld --verbose --help |grep -A 1 'Default options' #cat /etc/my.cnf ...
- 通用php与mysql数据库配置文件
<?php header("content-type:text/html;charset = utf-8"); $dblink = mysql_connect("l ...
- MYSQL数据库的优化
我们究竟应该如何对MySQL数据库进行优化?下面我就从MySQL对硬件的选择.MySQL的安装.my.cnf的优化.MySQL如何进行架构设计及数据切分等方面来说明这个问题. 服务器物理硬件的优化 在 ...
- [转]MySQL数据库的优化-运维架构师必会高薪技能,笔者近六年来一线城市工作实战经验
本文转自:http://liangweilinux.blog.51cto.com/8340258/1728131 年,嘿,废话不多说,下面开启MySQL优化之旅! 我们究竟应该如何对MySQL数据库进 ...
- MySQL数据库的优化-运维架构师必会高薪技能,笔者近六年来一线城市工作实战经验
原文地址:http://liangweilinux.blog.51cto.com/8340258/1728131 首先在此感谢下我的老师年一线实战经验,我当然不能和我的老师平起平坐,得到老师三分之一的 ...
- 优化mysql数据库的几个步骤
析问题: 1. 开启慢查询日志. 这个步骤就是为了记录慢查询的sql,为下个步骤做准备,此步骤相关的知识点有如下: 1. show variables like '%slow_query_log%'; ...
- MySQL 之 MySQL数据库的优化
服务器物理硬件的优化 在挑选硬件服务器时,我们应该从下面几个方面着重对MySQL服务器的硬件配置进行优化,也就是说将项目中的资金着重投入到如下几处: 1.磁盘寻道能力(磁盘I/O),我们现在用的都是S ...
随机推荐
- 如何在.Net Core MVC中为动态表单开启客户端验证
非Core中的请参照: MVC的验证 jquery.validate.unobtrusive mvc验证jquery.unobtrusive-ajax 参照向动态表单增加验证 页面引入相关JS: &l ...
- spring boot 2.0 源码分析(三)
通过上一章的源码分析,我们知道了spring boot里面的listeners到底是什么(META-INF/spring.factories定义的资源的实例),以及它是创建和启动的,今天我们继续深入分 ...
- 数组操作方法中的splice()和concat() 以及slice()
1.splice()方法是修改Array的'全能方法',它可以从指定的索引开始删除若干元素,然后再从该位置添加若干元素,其中有三个参数(x,y,z) x:从索引x开始操作数组; y:0或不为0,当为0 ...
- Docker中“TERM environment variable not set.”问题
在使用top查容器内部资源利用情况时候,发现无法使用,报“TERM environment variable not set.”错误.从网上找到了解决方案,经实验有效 root@103b5f05462 ...
- 谷歌旗下专业图片编辑Snapseed获重大更新
谷歌旗下的图片编辑应用Snapseed今天获得重大更新,承诺为用户的手机或者平板带来“精确和卓越控制的专业图片编辑软件”.Android和iOS版本同时获得更新,新增包括镜头模糊.色条对比.更加灵活的 ...
- CentOS7安装后连不上网络无法使用yum
更新日期:2018年5月31日 笔者今天在本地VMware中安装了CentOS7后,使用yum安装wget的时候发现不能下载,并有下图所示的提示: 于是,笔者就去问度娘,然后就找到了如下各种回复: 1 ...
- [javaSE] 网络编程(TCP,UDP,Socket特点)
UDP特点: 面向无连接,把数据打包发过去,收不收得到我不管 数据大小有限制,一次不能超过64k,可以分成多个包 这是个不可靠的协议 速度很快 视频直播,凌波客户端,feiQ都是UDP协议 TCP特点 ...
- 【基于初学者的SSH】struts02 数据封装的三种方式详解
struts的数据封装共有3中方式,属性封装,模型驱动封装和表达式封装,其中表达式封装为常用 一:属性封装: 属性封装其实就是自己定义变量,注意变量名要和表单的name属性名一致,然后生成get和se ...
- 《AlphaGo世纪对决》与周志华《机器学习》观后感
这两天看了<AlphaGo世纪对决>纪录片与南大周志华老师的<机器学习>,想谈谈对人工智能的感想. 首先概述一下视频的内容吧,AlphaGo与李世石对战的过程大家都有基本的了解 ...
- Linux安装jdk,编写helloworld程序
今天学习了Linux安装jdk,做个笔记记录一下. 第一步,确定Linux是32位的还是64位的,然后到oracle官网上下载对应版本的jdk,一般下载.tar.gz文件.查看Linux的版本的命令是 ...