[mysql-Ver5.6.23] windows版my.ini配置
基于utf8mb4比utf8多了种编码,能更好的支持emoji表情(http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html),所以我想让自己的mysql服务器默认使用utf8mb4编码。
于是就得到了配置文件 D:\db\MySQL\Data5.6\my.ini(并不是D:\db\MySQL\Server5.6\my-default.ini)
[client]
no-beep
port=3306 [mysql] [mysqld]
port=3306
datadir=D:/db/MySQL/Data5.6/Data character-set-client-handshake = FALSE
character-set-server=utf8mb4
collation-server = utf8mb4_general_ci
init_connect='set names utf8mb4' default-storage-engine=INNODB sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" log-output=FILE
general-log=0
general_log_file="TIANXIAOKU.log"
slow-query-log=1
slow_query_log_file="TIANXIAOKU-slow.log"
long_query_time=10 log-error="TIANXIAOKU.err" server-id=1 max_connections=151 query_cache_size=0 table_open_cache=2000 tmp_table_size=48M thread_cache_size=10 myisam_max_sort_file_size=100G myisam_sort_buffer_size=87M key_buffer_size=8M read_buffer_size=64K
read_rnd_buffer_size=256K sort_buffer_size=256K innodb_additional_mem_pool_size=7M innodb_flush_log_at_trx_commit=1 innodb_log_buffer_size=4M innodb_buffer_pool_size=280M innodb_log_file_size=48M innodb_thread_concurrency=17 innodb_autoextend_increment=64 innodb_buffer_pool_instances=8 innodb_concurrency_tickets=5000 innodb_old_blocks_time=1000 innodb_open_files=300 innodb_stats_on_metadata=0 innodb_file_per_table=1 innodb_checksum_algorithm=0 back_log=80 flush_time=0 join_buffer_size=256K max_allowed_packet=4M max_connect_errors=100 open_files_limit=4161 query_cache_type=0 sort_buffer_size=256K table_definition_cache=1400 binlog_row_event_max_size=8K sync_master_info=10000 sync_relay_log=10000 sync_relay_log_info=10000
其中最主要的是以下几句:
character-set-client-handshake = FALSE # 设置客户端使用服务端配置的编码,忽略客户端编码的配置
character-set-server=utf8mb4 # 设置服务端编码
collation-server = utf8mb4_general_ci # 设置服务端排序规则
init_connect='set names utf8mb4'
还有个需要注意的就是:
1. default-storage-engine=INNODB 默认的数据存储引擎
2. sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" 规则越严格,意味着操作时受到的限制越多!
----------------------------------------------------------------------
再贡献一个windows上的phpstudy中mysql下的my.ini(D:\soft\phpStudy\MySQL\my.ini)配置:
# power by phpStudy 2014 www.phpStudy.net 官网下载最新版 [client]
port=3306 [mysql] [mysqld]
port=3306
basedir="D:/soft/phpStudy/MySQL/"
datadir="D:/soft/phpStudy/MySQL/data/"
character-set-client-handshake=FALSE
character-set-server=utf8mb4
collation-server=utf8mb4_general_ci
default-storage-engine=InnoDB
init_connect='set names utf8mb4'
sql-mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections=512 query_cache_size=0
table_cache=256
tmp_table_size=18M thread_cache_size=8
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=35M
key_buffer_size=25M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K innodb_additional_mem_pool_size=2M innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M innodb_buffer_pool_size=47M
innodb_log_file_size=24M
innodb_thread_concurrency=8
[mysql-Ver5.6.23] windows版my.ini配置的更多相关文章
- MySQL在windows的my-default.ini配置
my-default.ini分为两块:Client Section和Server Section. Client Section用来配置MySQL客户端参数. 要查看配置参数可以用下面的命令: sho ...
- Windows版Redis主从配置
一.下载 从github上下载Redis的zip包,地址:https://github.com/MicrosoftArchive/redis/releases Redis本身不支持windows,这是 ...
- Windows下面安装和配置MySQL(5.6.20)
1.首先到http://dev.mysql.com/ 上下载windows版mysql5.6免安装zip包.然后将zip包解压到D:\mysql-5.6.20-winx64下. 2.复制mysql下的 ...
- (转)Windows下面安装和配置MySQL(5.6.20)
原文地址:http://www.cnblogs.com/qiyebao/p/3887055.html 1.首先到http://dev.mysql.com/ 上下载windows版mysql5.6免安装 ...
- MySQL设置字符集为UTF8(Windows版)
Windows版MySQL设置字符集全部为utf8的方式 MySQL安装目录下的my.ini文件 [client]节点 default-character-set=utf8 (增加) [mysq ...
- MySQL 5.7 for Windows 解压缩版 MySQL 服务无法启动
MySQL 5.7 for Windows 解压缩版配置安装 http://jingyan.baidu.com/article/f3ad7d0ffc061a09c3345bf0.html basedi ...
- 在Windows上安装MySQL(免安装ZIP版)
在 Windows 上安装MySQL(免安装ZIP版) 因为一些原因,重新安装了MySQL数据库,重装时习惯性使用最新版下载 此过程中发现MySQL 5.7.12 和MySQL 5.6的安装有些区别: ...
- MySQL Windows版安装详解
一.下载MySQL MySQL官网https://dev.mysql.com提供了Windows下的安装版msi和解压版zip,其中均包含32和64位版本,mis版本与SqlServer安装基本一致N ...
- MySQL 5.7 解压版 安装教程(图文详细)[Windows]
最近在学习中用到了MySQL数据库,在安装过程中遇到了不少问题,在翻了大半天百度后,问题基本都解决了,所以写一篇MySQL 5.7 解压版的图文详细安装教程. 至于为什么我会选择解压版而不是安装版,一 ...
随机推荐
- 【转】Pycharm创建py文件时自定义头部模板
File->settings->Editor->File and Code Templates->Python Script #!/usr/bin/env python # - ...
- XnView查看图片实际大小
找了很多软件,只有它可以显示尺寸大小. 各位如有别的发现,可留言推荐,谢谢
- linux下的c/c++调试器gdb
Reference: http://www.cnblogs.com/xd502djj/archive/2012/08/30/2663960.html linux下的c/c++调试器gdb gdbLi ...
- virtual box 5.2.12 扩展包安装
http://download.virtualbox.org/virtualbox/ 找到对应版本的virulbox去下载就可以了
- 解决maven项目 maven install失败 错误 Failed to execute goal org.apache.maven.plugins
1.Maven构建失败 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin: 2.3.4 :compile ( ...
- iOS友盟推送测试模式添加手机设备报红解决如下
设备描述红色一般是没有往友盟发日志,或者appkey漏掉了.先检查是否正确的填写了推送的appkey,统计的方法为MobClick startWithAppkey:推送的方法为UMessage sta ...
- java基础篇---I/O技术(三)
接上一篇java基础篇---I/O技术(二) Java对象的序列化和反序列化 什么叫对象的序列化和反序列化 要想完成对象的输入或输出,还必须依靠对象输出流(ObjectOutputStream)和对象 ...
- Swift is Open Source 博客note
Swift is Open Sourcehtml, body {overflow-x: initial !important;}html { font-size: 14px; } body { mar ...
- WPF 系列学习
WPF CheckBox 自定义样式 给Button设置ToolTip 圆角Button 样式
- Linux下的微秒级别的定时器
/* * @FileName: test_sleep.c * @Author: wzj * @Brief: * * * @History: * * @Date: 2012年02月07日星期二22:20 ...