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执行的第 ...
随机推荐
- Java Web项目(Extjs)报错二
1.Java Web项目(Extjs)报错二 具体报错如下: usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ...
- TypeError:_12.store.query is not a function
1.错误描述 TypeError:_12.store.query is not a function _SearchMixin.js(第62行 ...
- PyTorch官方中文文档:torch.nn
torch.nn Parameters class torch.nn.Parameter() 艾伯特(http://www.aibbt.com/)国内第一家人工智能门户,微信公众号:aibbtcom ...
- View的平移、缩放、旋转以及位置、坐标系
原创 2015年05月12日 13:15:29 标签: Android / Scroll / Scale / Translation / Rotation 24733 Android开发中,经常会接触 ...
- Ubuntu出现ERR_PROXY_CONNECTION_FAILED错误解决方案
我是Ubuntu新手,因为想查看国外的资料,然后安装了灯笼,结果打开谷歌浏览器出现了ERR_PROXY_CONNECTION_FAILED错误,未连接到互联网,代理服务器出现错误,然后Firefox也 ...
- Gedit : 我的开场白 [TPLY]
为什么用Gedit 在学校的高一新生里,好像就只有我使用Gedit 大家都笑我是"用记事本编程的人" 我就想 到考场看看你们笑得出来不 先放一个高配emacs配置 (global- ...
- freemind中内容变成html转义字符解决方法
在使用freemind的时候,没有正常关闭,导致原来的内容变成下面这样: <html> <body> <p> <b>查询所有</b> < ...
- 改数据库编码latin1为utf8
因为建数据库的时候没有选utf8,所以默认是latin1 在网上查了好多资料 ,试了很多种方法,都不奏效,有用的一个竟然要一列一列的改, 最后在评论里发现了这个,抱着试一试的心态竟然成功改过来了,在这 ...
- C# + Javascript 实现评论回复功能
首先先介绍一下前台 <script type="text/javascript"> function openWindow() { window.open(" ...
- Android Studio 封装的类的继承
有个封装好的Firebase.java文件,放到项目中直接使用就可以,这个需要继承一个AbstractFirebase类,在广告代码中,可以等到加广告的时候来加这个文件. 这个地方的继承,因为是ads ...