1、第一步 prepare
sysbench —db-driver=mysql —mysql-host=127.0.0.1 —mysql-port=3306 —mysql-user=root —mysql-password=A123456 —mysql-db=bh-online-trade oltp_insert prepare

2、第二步 run
sysbench —db-driver=mysql —mysql-host=127.0.0.1 —mysql-port=3306 —mysql-user=root —mysql-password=A123456 —mysql-db=bh-online-trade —num-threads=200 oltp_insert run

sysbench —db-driver=mysql —mysql-host=127.0.0.1 —mysql-port=8066 —mysql-user=cbhb_master —mysql-password=masteR123456 —mysql-db=bh_online_trade_dev_sc —num-threads=200 oltp_insert run

3、第三步 cleanup
sysbench —mysql-host=localhost —mysql-port=3306 —mysql-user=sbtest —mysql-password=123456 —mysql-db=tempdb oltp_insert cleanup

帮助

sysbench —help 详细参数
https://github.com/akopytov/sysbench

安装

apt-get install sysbench