MySQL环境部署神器dbdeployer,Sandbox的替代品

0    262    1

Tags:

👉 本文共约3306个字,系统预计阅读时间或需13分钟。

目录


    https://github.com/datacharmer/dbdeployer

    https://github.com/datacharmer/mysql-sandbox

    dbdeployer是go语言版实现的sandbox,和sandbox同一个作者。

    dbdeployer能够快速部署数据库测试环境,一键实现Oracle MySQL、Percona MySQL、MariaDB、TiDB、MySQL NDB Cluster、PXC等测试环境的构建。

    DBdeployer is a tool that deploys MySQL database servers easily. This is a port of MySQL-Sandbox, originally written in Perl, and re-designed from the ground up in Go. See the features comparison for more detail.


    dbdeployer的安装:

    直接到github下载release包即可

    tar xf dbdeployer-1.19.0.linux.tar.gz -C ./

    chmod +x dbdeployer-1.19.0.linux

    mv dbdeployer-1.19.0.linux /usr/local/bin/dbdeployer

    mkdir /root/opt/mysql -pv

    【方式1、离线方式 部署mysql安装包】

    将 mysql(我这里用的是5.7和8.0)的general安装包传到服务器上,然后执行

    dbdeployer unpack mysql-8.0.15-linux-glibc2.12-x86_64.tar.xz

    dbdeployer unpack mysql-5.7.25-linux-glibc2.12-x86_64.tar.gz

    unpack后,在/root/opt/mysql 目录下自动解压成如下样子:

    image.png

    如果要解压后的文件夹名称特殊化,则可以如下方法:

    dbdeployer unpack --prefix=ps Percona-Server-5.7.21-linux.tar.gz

    Unpacking tarball Percona-Server-5.7.21-linux.tar.gz to $HOME/opt/mysql/ ps5.7.21

    【方式2、在线下载的方式部署mysql安装包】

    dbdeployer remote --help

    dbdeployer remote list # 查看远程可下载的mysql安装包

    Files available in https://raw.githubusercontent.com/datacharmer/mysql-docker-minimal/master/dbdata/available.json

    4.1 -> [mysql-4.1.22]

    5.0 -> [mysql-5.0.15 mysql-5.0.96]

    5.1 -> [mysql-5.1.72]

    5.5 -> [mysql-5.5.61 mysql-5.5.62]

    5.6 -> [mysql-5.6.41 mysql-5.6.43]

    5.7 -> [mysql-5.7.24 mysql-5.7.25]

    8.0 -> [mysql-8.0.13 mysql-8.0.15]

    dbdeployer remote download mysql-5.6.43 # 在线下载 mysql-5.6.43的安装包

    本人提供Oracle(OCP、OCM)、MySQL(OCP)、PostgreSQL(PGCA、PGCE、PGCM)等数据库的培训和考证业务,私聊QQ646634621或微信dbaup66,谢谢!
    AiDBA后续精彩内容已被站长无情隐藏,请输入验证码解锁本文!
    验证码:
    获取验证码: 请先关注本站微信公众号,然后回复“验证码”,获取验证码。在微信里搜索“AiDBA”或者“dbaup6”或者微信扫描右侧二维码都可以关注本站微信公众号。

    标签:

    Avatar photo

    小麦苗

    学习或考证,均可联系麦老师,请加微信db_bao或QQ646634621

    您可能还喜欢...

    发表回复