当前位置 : 主页 > 操作系统 > centos >

sandbox 快速部署mysql

来源:互联网 收集:自由互联 发布时间:2023-09-07
MySQL Sandbox is a tool that installs one or more MySQL servers within seconds, easily, securely, and with full control. Once installed, the sandbox is easily used and maintained, without using complex options. Replicated and multiple sandb

MySQL Sandbox is a tool that installs one or more MySQL servers within seconds, easily, securely, and with full control.

Once installed, the sandbox is easily used and maintained, without using complex options.

Replicated and multiple sandboxes can be used individually or all at once.

通过mysql sandbox可以快速部署多种mysql使用环境包括:单实例mysql,多实例mysql,单机mysql replication环境

1.下载mysql sandbox

​​http://mysqlsandbox.net/index.html​​

2.安装所需的包

MySQL-Sandbox-3.1.05.tar.gz
mysql-5.6.28-linux-glibc2.5-x86_64.tar.gz

3.安装

tar -zxvf MySQL-Sandbox-3.1.05.tar.gz
mv MySQL-Sandbox-3.1.05 /usr/local/sandbox
cd /usr/local/sandbox
yum install perl-ExtUtils-Embed -y
perl Makefile.PL
make
make test
make install

4.配置

echo 'export SANDBOX_AS_ROOT=1' >> /root/.bash_profile
source /root/.bash_profile

5.sandbox相关命令

make_sandbox
make_multiple_sandbox
make_replication_sandbox
make_sandbox_from_installed
make_sandbox_from_source
make_multiple_custom_sandbox

6.make_sandbox

make_sandbox  mysql-5.6.28-linux-glibc2.5-x86_64.tar.gz

sandbox 快速部署mysql_mysql

默认在家目录下的sandboxes下

sandbox 快速部署mysql_多实例_02

启动mysql(默认已经启动了)

pgrep -fl mysql 

sandbox 快速部署mysql_多实例_03

可以杀掉进程,自己启动看看,启动停止脚本在/root/sandboxes/msb_5_6_28

pkill -9 mysqld
./start

sandbox 快速部署mysql_linux_04

登陆mysql

./use

sandbox 快速部署mysql_多实例_05

7.make_multiple_sandbox(安装多个实例,默认为3个)

make_multiple_sandbox mysql-5.6.28-linux-glibc2.5-x86_64.tar.gz  

sandbox 快速部署mysql_linux_06

默认部署3个实例,想要部署更多实例可以加参数--how_many_nodes = number,上面部署完成以后我们看看 

sandbox 快速部署mysql_linux_07

登陆相应的实例看看

./n1

sandbox 快速部署mysql_linux_08

./n2

sandbox 快速部署mysql_多实例_09

./n3

sandbox 快速部署mysql_多实例_10

到此sandbox安装完成啦!!! 

【文章转自 响水网页制作 http://www.1234xp.com/xiangshui.html 网络转载请说明出处】
网友评论