How to provide path to sysbench to create mysql database other than '/var/lib/mysql/ 'path ??

Asked by Amar Bharamshetti

I am running mysql sysbench for kvm tesing. On kvm guest I have created database and created user. From the client side I am invoking this command to add entries in database created on kvm guest:

 ./sysbench --oltp-table-size=100000 --test=tests/db/oltp.lua --mysql-user=client1 --mysql-password=password1 --mysql-host=90.0.0.1 --mysql-db=sbtest1 prepare

By default database is getting created in '/var/lib/mysql/' path. In my case problem is the space allocated for '/' file system is only 5G. So client/s can't add more record or can't do write operations as there is not much space. So is there any option for sysbench which can be used to specify the path while creating/adding entries/modifying the database, So I can attach hard drive to kvm guest, create database and run sysbench ?? Thanks in advance ..!!

Question information

Language:
English Edit question
Status:
Solved
For:
sysbench Edit question
Assignee:
No assignee Edit question
Solved by:
Alexey Kopytov
Solved:
Last query:
Last reply:
Revision history for this message
Best Alexey Kopytov (akopytov) said :
#1

sysbench does not create any database files itself, it just talks to the MySQL server. So it is a MySQL server configuration question. Look up the 'datadir' option in the MySQL documentation.

Revision history for this message
Amar Bharamshetti (amar123) said :
#2

Thanks Alexey Kopytov, that solved my question.