1.下载sysbench version 0.5
https://github.com/akopytov/sysbench
2.
[root@server1 sysbench-0.5]# pwd
/root/sysbench-0.5
./autogen.sh
./configure
make
make install
3.
[root@server1 sysbench-0.5]# echo "/usr/local/mysql/lib" >>/etc/ld.so.conf
[root@server1 sysbench-0.5]# ldconfig
4.oltp测试
/usr/local/bin/sysbench --test=/root/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=10000 --oltp-tables-count=1 --mysql-user=root --mysql-password=xxx --mysql-host=10.24.220.232 --mysql-port=3306 --num-threads=4 --max-requests=0 --max-time=30 --report-interval=3 prepare
5.
/usr/local/bin/sysbench --test=/root/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=10000 --oltp-tables-count=1 --mysql-user=root --mysql-password=xxx --mysql-host=10.24.220.232 --mysql-port=3306 --num-threads=4 --max-requests=0 --max-time=30 --report-interval=3 run