How to Start a 3-Node Percona XtraDB Cluster with the Binary Tarball Package

This blog post will help you configure a 3-node Percona XtraDB Cluster using a binary tarball on your local machine. Configuration files are auto-generated with mostly default configurations except for port/IP address details. The tool has the handy script to create configuration files and start multiple Percona XtraDB Cluster nodes on the fly, helping you to start PXC quickly without spending time on startup configuration as well as avoid using any virtual environments.  The script is available in the percona-qa github project. Currently, this script supports PXC binary tarball distributions only.

You can download the appropriate tarball package from the Percona-XtraDB-Cluster-8.0 downloads page. Once you have the packages available on your local machine, unpack the tarball package.

Note: You can use the DBDeployer tool to deploy PXC-5.7 servers easily. script also works with PXC-5.7 packages.

Now we need to run the script from the Percona XtraDB Cluster base directory. It will check out the PXC startup script called start_pxc.

The following steps will help you to start a 3-node PXC in CentOS 7.

1. Checkout repo:

2. Download PXC binary tarball packages for CentOS7 (In this blog we will be using the PXC-8.0 experimental package):

3. Unpack tarball package and run script from Percona XtraDB Cluster base directory:

4. If you want to start the 3-node cluster, please use numeric 3 as parameter with ./start_pxc:

The start_pxc script will also create shutdown(stop)/wipe/cli sanity scripts.

The ./stop_pxc script will stop all cluster nodes.

The ./[1-3]_node_cli  scripts will help to login to the respective node using the MySQL client.

The ./wipe script will trigger stop_pxc script and move the data directory to .PREV.

The configuration files will be created in the base directory. You can also add custom configurations in the start_pxc script.

Share this post

Leave a Reply