FATAL: failed to initialize database driver! with Sysnbech 0.4.X

Recently, I came through with this error. It was weird because I have never seen this error earlier.

[root@percona-pxc55-1 nilnandan]# sysbench --test=oltp 
--oltp-table-size=1000000 --mysql-db=dbtest --mysql-user=msandbox 
--mysql-password=msandbox --mysql-socket=/tmp/mysql_sandbox5537.sock 
prepare
sysbench 0.4.12: multi-threaded system evaluation benchmark
FATAL: no database driver specified
FATAL: failed to initialize database driver!
[root@percona-pxc55-1 nilnandan]#

After some research, found that with Sysbench 0.4.x, we have to use option –db-driver to make it work. So I have used it and it worked.

[root@percona-pxc55-1 nilnandan]# sysbench --test=oltp 
--oltp-table-size=1000000 --mysql-db=dbtest --mysql-user=msandbox 
--mysql-password=msandbox --mysql-socket=/tmp/mysql_sandbox5537.sock 
--db-driver=mysql --oltp-auto-inc=off prepare
sysbench 0.4.12: multi-threaded system evaluation benchmark
Creating table 'sbtest'...
Creating 1000000 records in table 'sbtest'...
[root@percona-pxc55-1 nilnandan]#

Even you have to use it while you run the benchmark

[root@percona-pxc55-1 nilnandan]# sysbench --test=oltp 
--oltp-table-size=1000000 --oltp-test-mode=complex --oltp-read-only=off 
--num-threads=100 --max-time=180 --max-requests=0 --mysql-db=dbtest 
--mysql-user=msandbox --mysql-password=msandbox 
--mysql-socket=/tmp/mysql_sandbox5537.sock --db-driver=mysql run

sysbench 0.4.12: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 100
Doing OLTP test.
Running mixed OLTP test
Using Special distribution (12 iterations, 1 pct of values are 
returned in 75 pct cases)
Using "BEGIN" for starting transactions
Using auto_inc on the id column
Threads started!
Time limit exceeded, exiting...
(last message repeated 99 times)
Done.
...
Threads fairness:
 events (avg/stddev): 536.2800/6.95
 execution time (avg/stddev): 179.9593/0.13
[root@percona-pxc55-1 nilnandan]#

 

 

Leave a Reply