Mysql-sandbox Installation Configuration Notes

Source: Internet
Author: User

The sandbox installation can be used on GitHub, or it can be installed using CPAN.

It is recommended to use the CPAN one-click installation.


# Install Mysqlsanbox

Yum Install cpan Perl-yaml perl-test-simple-y
CPAN Mysql::sandbox
echo ' Export sandbox_as_root=1 ' >>/ROOT/.BASHRC
Source/root/.bashrc


Put several common MySQL generic binaries ready for use in the/opt/directory. As follows:

[Email protected]/opt]# ll
Total 1035444
-rw-r--r--1 root root 640650826 2017-07-27 20:53 mysql-5.7.19-linux-glibc2.12-x86_64.tar.gz
-rw-r--r--1 root root 419634124 2017-07-27 20:53 mariadb-10.3.0-linux-x86_64.tar.gz


Create a 10.3.0 version of the MARIADB instance

Make_sandbox mariadb-10.3.0-linux-x86_64.tar.gz

The process is as follows: unpacking/opt/mariadb-10.3.0-linux-x86_64.tar.gz

Executing Low_level_make_sandbox--basedir=/opt/10.3.0 \

--SANDBOX_DIRECTORY=MSB_10_3_0 \

--install_version=10.3 \

--SANDBOX_PORT=10300 \

--no_ver_after_name \

--my_clause=log-error=msandbox.err

The MySQL Sandbox, version 3.2.13

(C) 2006-2017 Giuseppe Maxia

Installing with the following parameters:

Upper_directory =/root/sandboxes

Sandbox_directory = Msb_10_3_0

Sandbox_port = 10300

Check_port =

No_check_port =

Datadir_from = Script

Install_version = 10.3

Basedir =/opt/10.3.0

Tmpdir =

My_file =

Operating_system_user = root

Db_user = Msandbox

Remote_access = 127.%

Bind_address = 127.0.0.1

Ro_user = Msandbox_ro

Rw_user = MSANDBOX_RW

Repl_user = Rsandbox

Db_password = Msandbox

Repl_password = Rsandbox

My_clause = Log-error=msandbox.err

Init_options =

INIT_MY_CNF =

INIT_USE_CNF =

master =

Slaveof =

High_performance =

Gtid =

Pre_start_exec =

Pre_grants_exec =

Post_grants_exec =

Pre_grants_sql =

Post_grants_sql =

Pre_grants_file =

Post_grants_file =

Load_plugin =

PLUGIN_MYSQLX =

Mysqlx_port =

Expose_dd_tables =

Custom_mysqld =

Prompt_prefix = MySQL

Prompt_body = [\h] {\u} (\d) >

force =

No_ver_after_name = 1

VERBOSE =

Load_grants = 1

No_load_grants =

No_run =

No_show =

Keep_uuid =

History_dir =

Do you agree? ([Y],n) Y

# Starting Server

.. Sandbox server started

# Loading Grants

Your Sandbox server is installed in $HOME/sandboxes/msb_10_3_0

Then, enter Y to agree to the configuration parameters above.

After waiting for 20s, it will automatically generate a directory like Msb_10_3_0 in the/root/sandboxes directory.


The default is to listen on the address of the 127.0.0.1. If we're going to switch to an external address,

Cd/root/sandboxes/msb_10_3_0 (This directory has a lot of scripts, you can see the contents of it to know how to use it)

VIM/ROOT/SANDBOXES/MSB_10_3_0/MY.SANDBOX.CNF comment out listen that line of code,

Then execute the./restart.


./use can log in to MySQL

./MYCLI can log in with MYCLI (CentOS6 need to compile and install python27 for normal use MYCLI)



Create a set of Gtid replicated 5.7.19 Master and Slave instances

cd/opt/# # # need to first switch to the MySQL source package that path under the line Make_replication_sandbox--gtid--how_many_slaves=1 5.7.19 Create a set of Gtid replication 5.7.19 Master Cases



Wait 20s, you can start 1 sets of master-slave mysql5.7.19 environment.

Ss-lntp|grep MySQL can be verified.


How to use the Gtid master-slave machine created above:

CD/ROOT/SANDBOXESCD Rsandbox_5_7_19[[email protected]/root/sandboxes/rsandbox_5_7_19]#./test_replication Check Master-slave replication status

# Master Log:mysql-bin.000001-position:11309-rows:20

# testing Slave #1

Ok-slave #1 acknowledged reception of transactions from master

Ok-slave #1 IO Thread is running

Ok-slave #1 SQL Thread is running

ok-table T1 found on slave #1

ok-table T1 has () rows on #1

# Tests:5

# failed:0 (0%)

# Passed:5 (100%)

# Exit code:0



In this directory, both M and N1 are connection scripts that connect to the main library. Both S1 and N2 are scripts that connect from the library.




#####################################

If you need to build several identical instances at once and do not need to have a replication relationship, you can use the following command

Cd/opt/make_multiple_sandbox--how_many_nodes=3 mariadb-10.3.0-linux-x86_64.tar.gz # Default one-time build 3 instances



# # # # # # #还有些常用的命令, it's simple shell scripts, open up and see what you mean. Don't explain it.






This article is from the "notes of a Chicken" blog, please be sure to keep this source http://lee90.blog.51cto.com/10414478/1951579

Mysql-sandbox Installation Configuration Notes

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.