/Linux*********************************************************************************************/
[mysqld]
port=3306
user=mysql
wait_timeout=120
max_connections=800
table_open_cache=256
net_read_timeout=120
net_write_timeout=120
max_allowed_packet=32M
interactive_timeout=120
max_heap_table_size=32M
table_definition_cache=400
innodb_buffer_pool_size=16M
performance_schema_max_table_instances=400
[mysqld_safe]
pid-file=/D/programfiles/MySql/mysqld.pid
log-error=/D/programfiles/MySql/logs/mysqld.log
/Linux之Muti****************************************************************************************/
[mysqld_multi]
mysqld = /D/programfiles/MySql/bin/mysqld_safe
mysqladmin = /D/programfiles/MySql/bin/mysqladmin
user = root
password = ymPassByMySql_cc84647f4f524a4eb61d7d30d8d6bdb6
[mysqld1]
port=3306
user=mysql
wait_timeout=120
max_connections=800
table_open_cache=256
net_read_timeout=120
net_write_timeout=120
max_allowed_packet=32M
interactive_timeout=120
max_heap_table_size=32M
table_definition_cache=400
innodb_buffer_pool_size=16M
performance_schema_max_table_instances=400
socket = /D/programfiles/MySql/mysql3306.sock
basedir = /D/programfiles/MySql
datadir = /D/programfiles/MySql/data3306
pid-file = /D/programfiles/MySql/data3306/mysql3306.pid
log-error = /D/programfiles/MySql/logs/mysql3306.log
[mysqld2]
port=3307
user=mysql
wait_timeout=120
max_connections=800
table_open_cache=256
net_read_timeout=120
net_write_timeout=120
max_allowed_packet=32M
interactive_timeout=120
max_heap_table_size=32M
table_definition_cache=400
innodb_buffer_pool_size=16M
performance_schema_max_table_instances=400
socket = /D/programfiles/MySql/mysql3307.sock
basedir = /D/programfiles/MySql
datadir = /D/programfiles/MySql/data3307
pid-file = /D/programfiles/MySql/data3307/mysql3307.pid
log-error = /D/programfiles/MySql/logs/mysql3307.log
/Windows*******************************************************************************************/
[mysqld]
#编码设置
character-set-server=utf8
#绑定地址(IPV4)
bind-address = 0.0.0.0
#绑定端口
port = 3306
#服务Id
server_id = 1
#安装目录
basedir=D:/programfiles/MySql
#数据存放目录
datadir=D:/programfiles/MySql/data
#设置允许最大连接数
max_connections=1000
#通信缓冲区的最大长度
max_allowed_packet=10M
#Sql模式
sql-mode=“STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
#默认储存引擎
default-storage-engine=INNODB
#开启mysql事件调度
event_scheduler=1
[WinMySQLAdmin]
Server=D:/programfiles/MySql/bin/mysqld.exe
/Windows之Muti*******************************************************************************************/
由于Win下暂未发现是否可以使用mysqld_multi来配置,所以是新复制一个MySql,然后在新的my.ini里面进行如下配置
[mysqld]
#编码设置
character-set-server=utf8
#绑定地址(IPV4)
bind-address = 0.0.0.0
#绑定端口
port = 3307
#服务Id
server_id = 2
#安装目录
basedir=D:/programfiles/MySqlMuti/MySql_002
#数据存放目录
datadir=D:/programfiles/MySqlMuti/MySql_002/data
#设置允许最大连接数
max_connections=1000
#通信缓冲区的最大长度
max_allowed_packet=10M
#Sql模式
sql-mode=“STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION”
#默认储存引擎
default-storage-engine=INNODB
#开启mysql事件调度
event_scheduler=1
[WinMySQLAdmin]
Server=D:/programfiles/MySqlMuti/MySql_002/bin/mysqld.exe