mysql-5.7日志设置

环境

  • Windows10企业版X64

mysql安装目录:D:\mysql-5.7.15-winx64。

在mysql安装目录下手工新建一个log目录:mysql\log。

mysql\my.ini内容如下:

[client]
port=3306
default-character-set=utf8
[mysqld]
port=3306
character_set_server=utf8

#解压目录
basedir=D:\mysql-5.7.15-winx64
#解压目录下data目录
datadir=D:\mysql-5.7.15-winx64\data
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
#各种日志(查询、错误、慢查询)配置: 
#log_bin=D:\mysql-5.7.15-winx64\log\mysql-bin.log
log_error=D:\mysql-5.7.15-winx64\log\mysql.err
long_query_time=1
slow_query_log=ON
slow_query_log_file=D:\mysql-5.7.15-winx64\log\mysql-slow.log
general_log=ON
general_log_file=D:\mysql-5.7.15-winx64\log\log-mysql.log

max_connections=100
table_open_cache=256
query_cache_size=1M
tmp_table_size=32M
thread_cache_size=8
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=128M
innodb_buffer_pool_size=128M
innodb_log_file_size=10M
innodb_thread_concurrency=16
innodb-autoextend-increment=1000
join_buffer_size=128M
sort_buffer_size=32M
read_rnd_buffer_size=32M
max_allowed_packet=32M
explicit_defaults_for_timestamp=true
sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

 #sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[WinMySQLAdmin]
D:\mysql-5.7.15-winx64\bin\mysqld.exe

 

重启mysqld.exe。

 

posted @ 2016-11-08 14:39  xuxy03  阅读(7368)  评论(0编辑  收藏  举报