A new version of the Group Replication plugin for MySQL is available now. The newest release is available on Mac OS X, Solaris, and FreeBSD.
Additional platform support has been made possible via a new group communication implementation. This new communication system supports communication of messages between servers on many platforms, allowing MySQL to embrace the diversity of the MySQL community and enables Group Replication for more people on more platforms.
Installing Group Replication
The Group Replication Plugin is available for download on labs.mysql.com. Navigate to the labs releases page, select Group Replication from the dropdown list then select the package for your platform.
Installation packages are available for a variety of platforms. On the download page, you will find packages for FreeBSD, Oracle Enterprise Linux 6 and 7, Mac OS X 10.10, Solaris 11, and Ubuntu 15.04. Simply download the binary package for your system and install it on your server as described in the announcement blog post.
Note: The installation packages available are designed to work with a specific release of the MySQL server. In this case, MySQL server version 5.7.9.
Remember also that both MySQL server and plugin are built and released with optimized build flags. If you use a plugin built with different options on a released server package or a released plugin on a custom built server, this can result in load and usage problems. When using custom build options for either server or plugin you need to use the same build options on the other.
What about my platform?
If your platform is not currently available as a binary package, do not despair! You can download the source code and build it yourself.
Begin by downloading the source code from labs.mysql.com. Navigate to the labs releases page, select Group Replication from the dropdown list then select the source code .tar file.
How to compile the plugin
To compile the plugin on your system, you must first obtain the MySQL server source code for version 5.7.9. This is because the plugin requires the code and libraries within the MySQL server version 5.7.9 in order to compile properly.
You can download MySQL server version 5.7.9 source code from http://www.mysql.com/downloads/.
Note: There are several prerequisites you must have on your system in order to compile the code. See the online MySQL Reference Manual for more details about the prerequisites.
- Unpack the server code.
Example: tar -zxf mysql-5.7.9.tar.gz
- Unpack the plugin code.
Example: tar -zxf mysql-group-replication-0.6.0-dmr.tar.gz
- In the plugin folder, create a folder to build the plugin and move there:
Example: mkdir BIN; cd BIN
Now, the following commands are representative of compilation options used for our release packages, but your specific platform may require slightly different commands.
Note: On of thing that varies is BOOST, for MySQL 5.7.9 the required lib version 1.59.0. If you don’t have it installed in your system, you can use the enable download option
1 |
export DOWNLOAD_BOOST=1 |
and if you have it in a custom folder you can direct the server to it with
1 |
export WITH_BOOST="PATH" |
Linux
Starting from the good old Linux, we currently support Oracle Linux and Ubuntu, but other similar systems should be compatible as well.
Oracle Linux 6
To build the plugin type:
1
2
3
4
5
6
7
8
9
10
|
cmake .. -DWITH_MYSQL_SERVER_SOURCE_DIR="PATH_TO_SERVER_ON_STEP1" \ -DWITH_MYSQL_SERVER_CMAKE_ARGS="-DBUILD_CONFIG=mysql_release; \ -DCMAKE_BUILD_TYPE=RelWithDebInfo;-DCMAKE_C_FLAGS='-O2 -g -pipe -Wall \ -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector \ --param=ssp-buffer-size=4 -m64 -mtune=generic';\ -DCMAKE_CXX_FLAGS='-O2 -g -pipe -Wall \ -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector \ --param=ssp-buffer-size=4 -m64 -mtune=generic';-DWITH_INNODB_MEMCACHED=1;\ -DFEATURE_SET=community;-DWITH_EMBEDDED_SERVER=1;\ -DWITH_EMBEDDED_SHARED_LIBRARY=1" |
1 |
make |
Ubuntu
In Ubuntu, here tested on 15.04, the command is simpler:
1
2
3
4
|
cmake .. -DWITH_MYSQL_SERVER_SOURCE_DIR="PATH_TO_SERVER_ON_STEP1" \ -DWITH_MYSQL_SERVER_CMAKE_ARGS="-DBUILD_CONFIG=mysql_release;\ -DWITH_SSL=bundled;-DWITH_ZLIB=system;-DWITH_EXTRA_CHARSETS=all;\ -DWITH_INNODB_MEMCACHED=1;-DWITH_MECAB=system" |
1 |
make |
OS X
One of the new systems supported, on OS X you can now also build the group replication plugin. Here we present the command tested on OSX 10.10.
From the build folder type:
1
2
3
4
5
6
|
cmake .. -DWITH_MYSQL_SERVER_SOURCE_DIR="PATH_TO_SERVER_ON_STEP1" \ -DWITH_MYSQL_SERVER_CMAKE_ARGS="-DBUILD_CONFIG=mysql_release;\ -DINSTALL_LAYOUT=STANDALONE;-DCMAKE_OSX_ARCHITECTURES=x86_64;\ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9;\ -DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk;\ -DWITH_INNODB_MEMCACHED=1;-DFEATURE_SET=community" |
1 |
make |
Solaris
Group replication also now builds on Solaris. You to compile it with GCC as SunPro compilers can lead to compilation errors. With that in mind just execute the cmake command:
1
2
3
4
5
|
cmake .. -DWITH_MYSQL_SERVER_SOURCE_DIR="PATH_TO_SERVER_ON_STEP1" \ -DWITH_MYSQL_SERVER_CMAKE_ARGS="-DBUILD_CONFIG=mysql_release;\ -DINSTALL_LAYOUT=STANDALONE;-DCMAKE_C_FLAGS=-m64;\ -DCMAKE_CXX_FLAGS=-m64;-DWITH_INNODB_MEMCACHED=1;\ -DFEATURE_SET=community" |
1 |
make |
FreeBSD
And finally, we also tested and support FreeBSD, here tested on version 10. To build on this system, just use:
1
2
3
4
|
cmake .. -DWITH_MYSQL_SERVER_SOURCE_DIR="PATH_TO_SERVER_ON_STEP1" \ -DWITH_MYSQL_SERVER_CMAKE_ARGS="-DBUILD_CONFIG=mysql_release;\ -DINSTALL_LAYOUT=STANDALONE;-DWITH_INNODB_MEMCACHED=1;\ -DFEATURE_SET=community" |
1 |
make |
Once the compilation is complete, you can either run the server from its current location or install it on your system. See the online MySQL Reference Manual for specific information about installing from a source code tree as described here along with the post installation steps here.
Note: This release is a labs release. As such, we advise against using it in production and we anticipate there may be small defects and further refinement needed. If you do experience bugs, we are happy to fix them. Simply file a bug in the bugs database and our engineers will review the defect.
Where can I learn more about Group Replication?
To find out more about Group Replication, see the blog entitled, Getting started with MySQL Group Replication.
Conclusion
The development team is very pleased that they have been able to make the plugin compatible on platforms. They hope you try it out and help them make the plugin better through your experiences and suggestions.