mac下mysql安装与压测

安装mysql5.6

1
2
安装过的需要清理干净
brew install mysql@5.6

压测

1
2
3
4
5
brew install sysbench

sysbench --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=root --mysql-password='' --test=/usr/local/Cellar/sysbench/1.0.17/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp_tables_count=10 --oltp-table-size=1000000 --rand-init=on prepare

sysbench --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=root --mysql-password="" --test=/usr/local/Cellar/sysbench/1.0.17/share/sysbench/tests/include/oltp_legacy/oltp.lua --oltp_tables_count=6 --oltp-table-size=13000000 --num-threads=500 --oltp-read-only=off --report-interval=10 --rand-type=uniform --max-time=600 --max-requests=0 --percentile=99 run