sysbench安装与 压测试mysql

sysbench

首先是自己的网盘中有 sysbench-0.5.tar.gz
地址是:http://pan.baidu.com/s/1dF0YdFV    981f
QQ:305816339


cd /chenenhui
tar xf sysbench-0.5.tar.gz
cd sysbench-0.5
./autogen.sh 
#vim autogen.sh 

./configure  --with-mysql-includes=/usr/local/mysql/include/ --with-mysql-libs=/usr/local/mysql/lib/

./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/var/lib/mysql
make
##############  编译的时候会报错的,根据报错搜索相应的文件  ,重新多次 ./configure 
find / -name mysqlclient_r
find / -name *mysqlclient_r
find / -name *mysqlclient_r*

cp /usr/lib64/mysql/libmysqlclient* /usr/local/mysql/lib/

./configure --with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/local/mysql/lib

make
make install
history
./autogen.sh 
./configure --with-mysql --with-mysql-includes=/usr/local/mysql/include/ --with-mysql-libs=/usr/local/mysql/lib/
make
make install


### 压测试例
sysbench  --mysql-table-engine=innodb --oltp-table-size=42000 --debug=on  --num-threads=10  --mysql-db=db1 --mysql-user=root --mysql-host=127.0.0.1 --mysql-password=123456 --socket=/data/mysql3306/logs/mysql.sock --port=3306 --test=/chenenhui/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp_tables_count=10 prepare 

展开阅读全文

没有更多推荐了,返回首页