MySQL Sandbox is a very simple and fast tool suite for deploying MySQL technology. It allows you to deploy MySQL technology faster and without any hassle on the same machine. interference to achieve your ultimate goal. For example, as a software tester, you just want to test the soundness of the software system. You don’t need to worry too much about the installation of MySQL, and you don’t need to have too much experience with the MySQL database; sometimes we just If you are interested in some features of the new version, end the installation and deployment as quickly as possible, but focus on experiencing some of its features; you can use sandbox to deploy the database application architecture (ReplicationCluster) we need in the shortest time to match our existing Perform performance testing on application systems.
1. Install cpan
yum install cpan -y
2. Install the packages that the software depends on
yum install perl-Test-Simple -y
3. Install MySQL Sandbox
cpan MySQL::Sandbox
4. Set up the environment Variable (otherwise an error will be thrown)
[root@localhost ~]# echo 'export SANDBOX_AS_ROOT=1' >> /root/.bash_profile [root@localhost ~]# source /root/.bash_profile
5. Download the mysql binary software package (I downloaded mysql5.6 here. It is recommended that everyone develop the habit of downloading the software package from the official website. I have downloaded it here, as follows)
Download link: https://dev.mysql.com/downloads/mysql/
6. Run our mysql instance in a sandbox environment
Start the installation:
[root@localhost]# make_sandbox mysql-5.6.19-linux-glibc2.5-x86_64.tar.gz
Install multiple instances below:
You can execute make_multiple_sandbox --help
View one of its usage
The default is 3 nodes, which means three Example
[root@localhost]# make_multiple_sandbox mysql-5.6.19-linux-glibc2.5-x86_64.tar.gz installing node 1 installing node 2 installing node 3
After execution, a multi_msb_mysql-5_6_19 folder will be generated.