mysql多实例的一个配置文档

原创 2012年03月26日 10:33:33

在修改配置之前,我们可以通过如下命令进行初始化数据库目录

bin/mysql_install_db --user=mysql --datadir=/usr/local/mysql/var3306/


#

[mysqld_multi]
mysqld     = /usr/local/mysql/bin/mysqld_safe
mysqladmin = /usr/local/mysql/bin/mysqladmin
user       = admin //数据库的账号
password   = pwd_shutdown数据库的密码

[mysqld3306]
server-id  = 3306
port       = 3306
socket     = /usr/local/mysql/tmp/mysql-3306.sock
pid-file   = /usr/local/mysql/var3306/localhost.pid
log-error = /usr/local/mysql/var3306/localhost.err
datadir    = /usr/local/mysql/var3306
log-slow-queries = /usr/local/mysql/var3306/slowquery.log
#slow_query_log_file = /usr/local/mysql/var3306/slowquery.log


skip-external-locking
skip-name-resolve
back_log = 256
key_buffer_size = 2048M
table_cache = 512K
max_allowed_packet = 16M
table_open_cache = 256
sort_buffer_size = 16M
myisam_sort_buffer_size = 512M
net_buffer_length = 1M
read_buffer_size = 8M
read_rnd_buffer_size = 4M
join_buffer_size = 16M
thread_stack = 512K
query_cache_size = 128M
thread_concurrency = 16


character-set-server = GBK
wait-timeout = 31536000
max_connections = 10000
max_connect_errors = 10000000
#log-bin=mysql-bin
#binlog_format=mixed
long_query_time = 1
user       = mysql


[mysqld3307]
server-id  = 3307
port       = 3307
socket     = /usr/loca3307l/mysql/tmp/mysql-3307.sock
pid-file   = /usr/local/mysql/var3307/localhost.pid
log-error = /usr/local/mysql/var3307/localhost.err
datadir    = /usr/local/mysql/var3307
log-slow-queries = /usr/local/mysql/var3307/slowquery.log
#slow_query_log_file = /usr/local/mysql/var3307/slowquery.log


skip-external-locking
skip-name-resolve
back_log = 256
key_buffer_size = 2048M
table_cache = 512K
max_allowed_packet = 16M
table_open_cache = 256
sort_buffer_size = 16M
myisam_sort_buffer_size = 512M
net_buffer_length = 1M
read_buffer_size = 8M
read_rnd_buffer_size = 4M
join_buffer_size = 16M
thread_stack = 512K
query_cache_size = 128M
thread_concurrency = 16


character-set-server = GBK
wait-timeout = 31536000
max_connections = 10000
max_connect_errors = 10000000
#log-bin=mysql-bin
#binlog_format=mixed
long_query_time = 1
user       = mysql




[mysqld3308]
server-id  = 3308
port       = 3308
socket     = /usr/local/mysql/tmp/mysql-3308.sock
pid-file   = /usr/local/mysql/var3308/localhost.pid
log-error = /usr/local/mysql/var3308/localhost.err
datadir    = /usr/local/mysql/var3308
log-slow-queries = /usr/local/mysql/var3308/slowquery.log
#slow_query_log_file = /usr/local/mysql/var3308/slowquery.log


skip-external-locking
skip-name-resolve
back_log = 256
key_buffer_size = 2048M
table_cache = 512K
max_allowed_packet = 16M
table_open_cache = 256
sort_buffer_size = 16M
myisam_sort_buffer_size = 512M
net_buffer_length = 1M
read_buffer_size = 8M
read_rnd_buffer_size = 4M
join_buffer_size = 16M
thread_stack = 512K
query_cache_size = 128M
thread_concurrency = 16


character-set-server = GBK
wait-timeout = 31536000
max_connections = 10000
max_connect_errors = 10000000
#log-bin=mysql-bin
#binlog_format=mixed
long_query_time = 1
user       = mysql

[mysqldump]
quick
max_allowed_packet = 16M


[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates


[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M


[mysqlhotcopy]
interactive-timeout

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章推荐

亚马逊AWS学习——多网络接口下配置EC2实例连接公网的一个“bug”

之前在《亚马逊AWS学习——EC2的自定义VPC配置》这篇文章中讲述了如何设置自定义VPC并使自己的EC2实例能够连接公网。本篇说一下连接公网时会出现的一个小问题。如题所示,在一个EC2实例具有多个网...

CentOS7下yum安装mysql配置多实例

最近想试试Mysql的主从复制功能“Mysql Replication”,但是苦于没多台电脑,于是考虑在Linux上配置多个Mysql实例做为测试环境。 环境:虚拟机上的CentOS7 首先得在Cen...

mysql:多配置文件安装新端口实例

1.查找 my.cnf 配置文件,新建文件 my3309.cnf 文件并修改。 2.创建 datadir 目录 并 授权 3.mysql_install_db 初始化数据库 4.创建 mysql330...

MySQL多实例配置(一)

MySQL数据库的集中化运维,可以通过在一台MySQL数据库服务器上,部署多个MySQL实例。该功能是通过mysqld_multi来实现。mysqld_multi用于管理多个mysqld的服务进程,这...

Amazon EC2安装mysql多实例并配置主从复制

1、MySQL安装:EC2直接使用yum安装mysql很方便:yum install mysql mysql-server mysql-libs 此处安装了三个包完事之后可以直接使用 servic...

MySQL多实例配置(一)

MySQL数据库的集中化运维,可以通过在一台MySQL数据库服务器上,部署多个MySQL实例。该功能是通过mysqld_multi来实现。mysqld_multi用于管理多个mysqld的服务进程,这...

MySQL多实例配置

今天闲着没事又把mysql多实例知识回顾了一下,虽然以前配置过,这次还是遇到很多坑… 安装mysql数据库,见前面博文 创建mysql多实例的数据文件目录 本次是/data目录作为mysql多实例总...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:深度学习:神经网络中的前向传播和反向传播算法推导
举报原因:
原因补充:

(最多只允许输入30个字)