mysql的安装
安装
#yum install mariadb
#yum install mariadb-server
#yum install mariadb-devel
启动服务
systemctl start mariadb
修改配置文件
vim /etc/my.cnf
[mysql]
default-character-set =utf8
sysbench
sysbench的下载
git clone https://github.com/akopytov/sysbench.git
使用的但是最新的版本,切换到对应的tag
git checkout -b tag-1.0.14 1.0.14
根据官网安装包
yum -y install make automake libtool pkgconfig libaio-devel
# For MySQL support, replace with mysql-devel on RHEL/CentOS 5
yum -y install mariadb-devel
# For PostgreSQL support
yum -y install postgresql-devel
build
./autogen.sh
# Add --with-pgsql to build with PostgreSQL support
./configure
make -j
make install
sysbench测试
sysbench oltp_write_only.lua --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=root --mysql-socket=/mnt/mysql/data/mysql/mysql.sock --mysql-db=test --db-driver=mysql --tables=10 --table_size=1000000 --report-interval=10 --threads=128 --time=120 prepare|run|cleanup