Welcome to the support page for dbbenchmark.com’s MySQL database benchmarking software.
The script is very simple to use if you follow the instructions.

1. MySQL 5.0.x or later
2. Python 2.4 or later
3. MySQLdb python module
4. Supported OS:

  • Linux (current) 2.6 kernel
  • OSX 10.5 or later
  • FreeBSD – Release 8.1
  • OpenBSD – Release 4.7

1. Methods for installing MySQLdb python module
a. Ubuntu / Debian and variants using apt-get package management
shell> sudo apt-get install python-mysqldb

b. Redhat / CentOS / Fedora using yum package manager
shell> sudo yum install MySQL-python

c. Redhat using up2date package management tool
shell> up2date install MySQL-python

d. FreeBSD / OpenBSD
- use pkg_add py-mysql

e. Python’s easy_install tool
shell> sudo easy_install MySQLdb

2. Setting up the benchmark schema
Before you can run the benchmarking script you have to create
the database schema. The script contains a command that will
print out the SQL commands to create the schema and user for
your purposes. Run the following to get the SQL commands:

shell>dbbenchmark.py –print-sql

Then execute the commands as the root user on your MySQL
database server to create the database, table, and user auth.

shell> mysql –user=root -p
mysql> create database dbbench;
mysql> use dbbench;
mysql> CREATE TABLE `dbbench` (
`id` BIGINT(64) UNSIGNED NOT NULL auto_increment,
KEY `B_ix` (`B`)

mysql> grant all on dbbench.* to ‘dbbench’@'localhost’ identified by ‘dbbench’;

3. Running with non-standard options
a. You can run the benchmarker with alternate options and settings.
Run dbbenchmark.py –help to get the menu of option flags.

b. By default the script benchmarks transactional databases, to
change this use the flag “–mysql-no-tx” and change your table to
a non-transactional table. You can do this with the following command:
mysql> alter table dbbench engine=myisam;

4. Running the script
Running the script is very simple. Once you have the schema/table/user
setup in MySQL you just run the following command:
shell> ./dbbenchmark.py

After the script finished running you can see your benchmark results in two places:
1) the terminal output (STDOUT) where you ran the script
2) the database on this website: http://www.dbbenchmark.com/wordpress/benchmarks/

5. Troubleshooting
a. Are the permissions correct? The results should look as follows:
shell> ls -al dbbenchmark.py
-rwx—— 1 user user 19716 Aug 27 19:55 dbbenchmark.py

If not, simply correct the permissions
shell> chmod 700 dbbenchmark.py

b. Is your python interpreter in a different location?
shell> which python

If that is the same then move along…
If not, change the FIRST and ONLY the first line in the dbbenchmark.py
script to reflect the location of your python binary.

c. Can you connect to MySQL? Run the following to connect with the
default settings that dbbenchmark uses:
shell> mysql –user=dbbench –password=dbbench –host=localhost dbbench
If you cannot connect to MySQL with those settings then you either need
to follow the instructions for setting up the schema/table/user above.
If you setup the user/pass differently, you can use those credentials
via the alternate connection settings shown in the “–help” menu.