mysql相关的设置

首先my sql有个配置文件 my.ini,该文件在mysql的安装包中。

 

1.在该文件中可以设置mysql的最大连接数,

# The maximum amount of concurrent sessions the MySQL server will
# allow. One of these connections will be reserved for a user with
# SUPER privileges to allow the administrator to login even if the
# connection limit has been reached.
max_connections=1000

 

2.编码类型, 有两个地方需要设置

[client]

port=3306

[mysql]

default-character-set=gbk

 

# The default character set that will be used when a new schema or table is
# created and no character set is defined
character-set-server=gbk

 

 

3.数据存放的路径。#Path to installation directory. All paths are usually resolved relative to this.
basedir="G:/Mysql/"

#Path to the database root
datadir="C:/ProgramData/MySQL/MySQL Server 5.1/Data/"

 

 

mysql的错误日志:位于 数据存放路径下的  XXX.ERR文件

 

 

在做了配置方面的修改后,需要重启mysql的服务。  windows下进入服务管理的命令是services.msc

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。