Created
August 27, 2020 03:00
-
-
Save BohuTANG/a791c6242b5dcc556f7cee57ffb2dfa5 to your computer and use it in GitHub Desktop.
MaterializeMySQL-sysbench.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. install the GTID based replication ClickHouse | |
1.1 build from the master | |
1.2 download from https://clickhouse-builds.s3.yandex.net/0/cff92c8ad3dea2d96b1dfaadc76c3c10b3d701b2/clickhouse_build_check/report.html | |
2. prepare MySQL with GTID | |
2.1 $docker run -d -e MYSQL_ROOT_PASSWORD=123 mysql:5.7 mysqld --datadir=/var/lib/mysql --server-id=1 --log-bin=/var/lib/mysql/mysql-bin.log --gtid-mode=ON --enforce-gtid-consistency | |
2.2 mysql> create database sbtest; | |
3. run sysbench prepare | |
$docker run --rm=true --name=sb-prepare severalnines/sysbench sysbench --db-driver=mysql --oltp-table-size=100 --oltp-tables-count=4 --threads=1 --mysql-host=172.17.0.2 --mysql-port=3306 --mysql-user=root --mysql-password=123 /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua prepare | |
4. create ClickHouse database | |
clickhouse> create database sbtest engine=MaterializeMySQL('172.17.0.2:3306', 'sbtest', 'root', '123'); | |
5. run sysbench insert for 30s | |
docker run --rm=true --name=sb-prepare severalnines/sysbench sysbench --db-driver=mysql --oltp-table-size=100 --oltp-tables-count=4 --threads=1 --mysql-host=172.17.0.2 --mysql-port=3306 --mysql-user=root --mysql-password=123 --report-interval=2 --time=30 /usr/share/sysbench/tests/include/oltp_legacy/insert.lua run | |
6. check the count? | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment