Install the prerequisits and clone the repository.
sudo apt-get install libtbb-dev libmysqlclient-dev libboost-program-options-dev libboost-thread-dev libboost-regex-dev libboost-system-dev libboost-chrono-dev pkg-config cmake libssl-dev git clone https://github.com/Percona-Lab/query-playback.git cd query-playback/ mkdir build_dir cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
You might see this error
CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: MYSQL_LIB linked by target "mysql_client" in directory /home/sproell/git/query-playback/percona_playback/mysql_client -- Configuring incomplete, errors occurred! See also "/home/sproell/git/query-playback/build_dir/CMakeFiles/CMakeOutput.log". See also "/home/sproell/git/query-playback/build_dir/CMakeFiles/CMakeError.log".
I found this issue on Github and after editing the file CMakeLists.txt (in the directory ~/git/query-playback/percona_playback/mysql_client/CMakeLists.txt ) as suggested, the tool compiles. You need to replace find_library(MYSQL_LIB “mysqlclient_r” PATH_SUFFIXES “mysql”) with find_library(MYSQL_LIB “mysqlclient” PATH_SUFFIXES “mysql”) (remove the _r suffix).
Then you can compile the project as documented here.
~/git/query-playback/build_dir cd build_dir cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. make sudo make install