mysql多实例运行
1.主配置文件
[mysqld_multi]
mysqld = /usr/local/mysql/bin/mysqld_safe
mysqladmin = /usr/local/mysql/bin/mysqladmin
user = dbaroot
password = dbaroot20140312
[mysqld3306] #3306
port = 3306
socket = /data/mysql_3306/var/mysql_3306.sock
datadir = /data/mysql_3306/var
pid-file = /data/mysql_3306/var/mysql3306.pid
event_scheduler=1
server-id = 1
log-bin = /data/mysqllog/binlog_3306/mysql-bin
binlog_format=mixed
log_bin_trust_function_creators = 1
wait_timeout = 300
expire_logs_days = 7
default-character-set = utf8
skip-name-resolve
character-set-server = utf8
back_log = 50
max_connections = 1000
max_connect_errors = 32
max_allowed_packet = 64M
table_cache = 2048
binlog_cache_size = 1M
max_heap_table_size = 64M
tmp_table_size = 64M
key_buffer_size = 32M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
sort_buffer_size = 8M
join_buffer_size = 8M
thread_cache_size = 8
thread_concurrency = 8
thread_stack = 192K
query_cache_size = 64M
query_cache_limit = 2M
tmp_table_size = 64M
ft_min_word_len = 2
default_table_type = INNODB
transaction_isolation = REPEATABLE-READ
slow_query_log
long_query_time = 2
log-short-format
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
#myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
#skip-bdb
innodb_file_per_table = 1
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 3G
innodb_data_file_path = ibdata1:1024M:autoextend
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 0
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
[mysqld3307] #3307
port = 3307
socket = /data/mysql_3307/var/mysql_3307.sock
datadir = /data/mysql_3307/var
pid-file = /data/mysql_3307/var/mysql3307.pid
event_scheduler=1
server-id = 1
log-bin = /data/mysqllog/binlog_3307/mysql-bin
binlog_format=mixed
log_bin_trust_function_creators = 1
wait_timeout = 300
expire_logs_days = 7
default-character-set = utf8
skip-name-resolve
character-set-server = utf8
back_log = 50
max_connections = 1000
max_connect_errors = 32
max_allowed_packet = 64M
table_cache = 2048
binlog_cache_size = 1M
max_heap_table_size = 64M
tmp_table_size = 64M
key_buffer_size = 32M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
sort_buffer_size = 8M
join_buffer_size = 8M
thread_cache_size = 8
thread_concurrency = 8
thread_stack = 192K
query_cache_size = 64M
query_cache_limit = 2M
tmp_table_size = 64M
key_buffer_size = 32M
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size = 64M
sort_buffer_size = 8M
join_buffer_size = 8M
thread_cache_size = 8
thread_concurrency = 8
thread_stack = 192K
query_cache_size = 64M
query_cache_limit = 2M
tmp_table_size = 64M
ft_min_word_len = 2
default_table_type = INNODB
transaction_isolation = REPEATABLE-READ
slow_query_log
long_query_time = 2
log-short-format
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 10G
#myisam_max_extra_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover
#skip-bdb
innodb_file_per_table = 1
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 3G
innodb_data_file_path = ibdata1:1024M:autoextend
innodb_file_io_threads = 4
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 0
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
[mysqldump]
quick
max_allowed_packet = 64M
[mysql]
no-auto-rehash
[isamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M
[myisamchk]
key_buffer = 512M
sort_buffer_size = 512M
read_buffer = 8M
write_buffer = 8M
[mysqlhotcopy]
interactive-timeout
[mysqld_safe]
open-files-limit = 8192
2.创建数据目录:
mkdir -p /data/mysql_3306/var
mkdir -p /data/mysql_3307/var
3.属主属组赋权:
chown -R mysql.root /data/mysql_330*
初始化:
/usr/local/mysql/bin/mysql_install_db --datadir=/data/mysql_3307/var/ --user=mysql
启动mysql即可。登陆的时候加上-p 3307/6.
mysql多实例运行的更多相关文章
- Windows下MySQL多实例运行(转)
关键字:Windows下MySQL多实例运行 阅读前注意事项: 1.有的版本的data目录不直接放在mysql安装目录下,有可能在:C:\ProgramData\MySQL\MySQL Server ...
- Windows下MySQL多实例运行
1.正常安装Windows版的MySQL,例如安装在C:\Program Files\MySQL文件夹里: 2.按照常规配置好MySQL: (注:5.6版本的 data文件夹与 my.ini文件在C: ...
- MYSQL 多实例运行
1.创建数据文件 mkdir /var/lib/mysql_3307 mysql_install_db --datadir=/var/lib/mysql_3307 --user=mysql 2.给数据 ...
- mysql 在一个实例运行情况下再搭建一个实例
配置mysql服务 详细步骤,请参考(http://study.lishiming.net/chapter17.html#mysql), 阿铭只把简单步骤写一下. 根据阿铭提供的地址,假如你已经搭建好 ...
- 在一台机子上,安装,运行两mysql数据库实例
为了方便测试,想要用到两个mysql数据库实例.以windows系统为例 当然安装第一个mysql数据库,很简单没什么说的.但是再要安装,运行mysql安装程序时,会提示,修复,卸载,重新安装. 这时 ...
- Mysql多实例 安装以及配置
MySQL多实例 1.什么是MySQL多实例 简单地说,Mysql多实例就是在一台服务器上同时开启多个不同的服务端口(3306.3307),同时运行多个Mysql服务进程,这些服务进程通过不同的soc ...
- Windows下MySQL多实例安装/主从复制/重置密码
Windows创建MySQL多实例 安装MYSQL和实例1 运行mysql-installer-community-5.7.16.0.msi 选择组件 MySQL Server 5.7.16 – X6 ...
- 如何在同一台机器上安装多个MySQL的实例
转自:'http://www.cnblogs.com/shangzekai/p/4375271.html 最近由于工作的需要,需要在同一台机器上搭建两个MySQL的实例,(注:已经存在了一个3306的 ...
- Mysql多实例添加到开机自启的方法
Mysql多实例配置成功后,想让配置成开机自启. 首先看一下Linux启动的知识点,顺序如下. 1 加载内核2 执行init程序3 /etc/rc.d/rc.sysinit # 由init执行的第 ...
随机推荐
- 关系网络理论︱细讲中介中心性(Betweeness Centrality)
关系网络在我认为都是一种很简单暴力地能挖掘人群特征关系的一种方式,特别今天去听了一场关于AI与金融领域的结合,里面提到了拓扑分析其实就是关系网络的解释.我在之前的文章( R语言︱SNA-社会关系网络- ...
- caffe+CPU︱虚拟机+Ubuntu16.04+CPU+caffe安装笔记
由于本机是window10系统,所以想尝试caffe就在自己电脑上整了一个虚拟机(详情可见:win10系统搭建虚拟机:VMware Workstation Player 12环境+Ubuntu Kyl ...
- 微信 Tinker 的一切都在这里,包括源码
最近半年以来,Android热补丁技术热潮继续爆发,各大公司相继推出自己的开源框架.Tinker在最近也顺利完成了公司的审核,并非常荣幸的成为github.com/Tencent上第一个正式公开的项目 ...
- 10种软件开发中 over-engineering 的错误套路
别把「不要过度使用 Generic」误解成「不用 Generic」,也别把「不要写一些不必要的 Wrapper」误解成「不写任何 Wrapper」.我只是在讲 over-engineering 这个事 ...
- freemarker自定义标签报错(一)
freemarker自定义标签 1.错误描述 freemarker.core.ParseException: Token manager error: freemarker.core.TokenMgr ...
- Linux集群问题~浅谈
系统扩展的方式 # scale up 向上扩展 # scale out 向外扩展 集群类型 LB 负载均衡集群 Load Balancing HA 高可用集群 High Availability HP ...
- hdu5820 Lights
主席树 但是能够想到题解的做法很难 #include <stdio.h> #include <string.h> #include <vector> #includ ...
- WPF基础篇之空间布局
由于之前自己做的都是大多是B/S架构的项目,加入新公司,公司现在用的WPF,在WPF中一个比较重要的知识点:布局 在网上找到一篇比较好的介绍WPF布局的文章. 文章地址:http://www.cnbl ...
- 在C#的控制台应用中使用Dapper链接MySQL并执行一些增删改查
一.首先先创建一个C#的控制台应用 二.然后添加上必要的命名空间 using System;using System.Collections.Generic;using MySql.Data.MySq ...
- Luogu4149:[IOI2011]Race
题目 bzoj权限题... Luogu Sol 点分治辣,边权非负,k>=1,开个\(1e6\)的桶就好辣 # include <bits/stdc++.h> # define RG ...