Docker container for percona playback. The original repo doesn't give complete details about how to install the tool successfully and they no longer maintain the project.
git clone git@github.com:turbo8p/percona-playback.git
cd percona-playback && docker-compose up -d
docker exec -it percona-playback bash
percona-playback --version
percona-playback --help
percona-playback --mysql-host=test-host --mysql-user=root --mysql-password=root --mysql-schema=mydb --query-log-file=mysql-slow.log
percona-playback --input-plugin general-log --mysql-host=test-host --mysql-user=root --mysql-password=root --mysql-schema=mydb --general-log-file=mysql-general.log
You have two options for replay input.
- Slow log
- General log
Add below config to your my.cnf
and restart the service. This will ensure that Mysql logs every queries.
[mysqld]
slow_query_log=1
slow_query_log_file=/path/to/mysql-slow.log
long_query_time=0.000
[mysqld]
general_log_file=/path/to/mysql-general.log
general_log=1