首页 > 数据库技术 > 详细

MySQL 测试工具 sysbench

时间:2018-07-12 12:32:39      阅读:167      评论:0      收藏:0      [点我收藏+]
1、配置 epel 源安装 sysbench

yum install -y sysbench

2、初始化数据

sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.1.226 --mysql-port=3306 --mysql-user=root --mysql-password=MySQL5.7 --oltp-test-mode=complex --oltp-tables-count=10 --oltp-table-size=100000 --threads=10 --time=120 --report-interval=10 --db-driver=mysql prepare

3、执行测试

sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.1.226 --mysql-port=3306 --mysql-user=root --mysql-password=MySQL5.7 --oltp-test-mode=complex --oltp-tables-count=10 --oltp-table-size=100000 --threads=10 --time=120 --db-driver=mysql --report-interval=10 run 

4、清理数据

sysbench /usr/share/sysbench/tests/include/oltp_legacy/oltp.lua --mysql-host=192.168.1.226 --mysql-port=3306 --mysql-user=root --db-driver=mysql --oltp-tables-count=10 --mysql-password=MySQL5.7 cleanup

查看文档:https://www.cnblogs.com/kismetv/p/7615738.html

MySQL 测试工具 sysbench

原文:http://blog.51cto.com/linux10000/2140808

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!