mysql 自带压力测试工具测试
1、 查看mysql5.7的最大连接数
show variables like’%max_connections%’;
通过命令set GLOBAL max_connections=xxxxxx时最大可设置10万连接,通过修改my.ini可随意设置
2、 Mysql内部测试Mysqlslap使用
mysqlslap -h127.0.0.1 -uroot -proot --concurrency=5000 --iterations=1 --auto-generate-sql --auto-generate-sql-load-type=mixed --auto-generate-sql-add-autoincrement --engine=innodb --number-of-queries=5000