diff --git a/wally/run_test.py b/wally/run_test.py
index 6606d04..5412be3 100755
--- a/wally/run_test.py
+++ b/wally/run_test.py
@@ -20,7 +20,7 @@
 from wally.timeseries import SensorDatastore
 from wally.discover import discover, Node, undiscover
 from wally import utils, report, ssh_utils, start_vms
-from wally.suits.itest import IOPerfTest, PgBenchTest
+from wally.suits.itest import IOPerfTest, PgBenchTest, MysqlTest
 from wally.sensors_utils import deploy_sensors_stage
 from wally.config import cfg_dict, load_config, setup_loggers
 
@@ -117,6 +117,7 @@
     tool_type_mapper = {
         "io": IOPerfTest,
         "pgbench": PgBenchTest,
+        "mysql": MysqlTest,
     }
 
     test_nodes = [node for node in nodes
@@ -455,6 +456,10 @@
             print("\n")
             print(IOPerfTest.format_for_console(data))
             print("\n")
+        if 'mysql' == tp and data is not None:
+            print("\n")
+            print(MysqlTest.format_for_console(data))
+            print("\n")
 
 
 def html_report_stage(cfg, ctx):
diff --git a/wally/suits/itest.py b/wally/suits/itest.py
index bd98dee..c3848a7 100644
--- a/wally/suits/itest.py
+++ b/wally/suits/itest.py
@@ -7,6 +7,7 @@
 import datetime
 
 from paramiko import SSHException, SFTPError
+import texttable
 
 from wally.utils import (ssize_to_b, open_for_append_or_create,
                          sec_to_str, StopTestError)
@@ -17,6 +18,7 @@
                              connect, read_from_remote, Local)
 
 from . import postgres
+from . import mysql
 from .io import agent as io_agent
 from .io import formatter as io_formatter
 from .io.results_loader import parse_output
@@ -78,30 +80,26 @@
     def __init__(self, *dt, **mp):
         IPerfTest.__init__(self, *dt, **mp)
 
-        if 'run_script' in self.options:
+        if 'scripts_path' in self.options:
+            self.root = self.options['scripts_path']
             self.run_script = self.options['run_script']
-            self.prepare_script = self.options['prepare_script']
+            self.prerun_script = self.options['prerun_script']
 
     def get_remote_for_script(self, script):
-        return os.path.join(self.tmp_dir, script.rpartition('/')[2])
+        return os.path.join(self.remote_dir, script.rpartition('/')[2])
 
-    def copy_script(self, src):
-        remote_path = self.get_remote_for_script(src)
-        copy_paths(self.node.connection, {src: remote_path})
-        return remote_path
 
     def pre_run(self):
-        remote_script = self.copy_script(self.node.connection,
-                                         self.pre_run_script)
-        cmd = remote_script
-        self.run_over_ssh(cmd)
+        copy_paths(self.node.connection, {self.root: self.remote_dir})
+        cmd = self.get_remote_for_script(self.pre_run_script)
+        self.run_over_ssh(cmd, timeout=2000)
 
     def run(self, barrier):
-        remote_script = self.copy_script(self.node.connection, self.run_script)
+        remote_script = self.get_remote_for_script(self.run_script)
         cmd_opts = ' '.join(["%s %s" % (key, val) for key, val
                              in self.options.items()])
         cmd = remote_script + ' ' + cmd_opts
-        out_err = self.run_over_ssh(cmd)
+        out_err = self.run_over_ssh(cmd, timeout=6000)
         self.on_result(out_err, cmd)
 
     def parse_results(self, out):
@@ -117,13 +115,31 @@
             msg_templ = "Error during postprocessing results: {0!s}. {1}"
             raise RuntimeError(msg_templ.format(exc, out_err))
 
+    def merge_results(self, results):
+        tpcm = sum([val[1] for val in results])
+        return {"res": {"TpmC": tpcm}}
+
 
 class PgBenchTest(TwoScriptTest):
     root = os.path.dirname(postgres.__file__)
-    prepare_script = os.path.join(root, "prepare.sh")
+    pre_run_script = os.path.join(root, "prepare.sh")
     run_script = os.path.join(root, "run.sh")
 
 
+class MysqlTest(TwoScriptTest):
+    root = os.path.dirname(mysql.__file__)
+    pre_run_script = os.path.join(root, "prepare.sh")
+    run_script = os.path.join(root, "run.sh")
+
+    @classmethod
+    def format_for_console(cls, data):
+        tab = texttable.Texttable(max_width=120)
+        tab.set_deco(tab.HEADER | tab.VLINES | tab.BORDER)
+        tab.header(["TpmC"])
+        tab.add_row([data['res']['TpmC']])
+        return tab.draw()
+
+
 class IOPerfTest(IPerfTest):
     tcp_conn_timeout = 30
     max_pig_timeout = 5
diff --git a/wally/suits/mysql/tpcc/prepare.sh b/wally/suits/mysql/prepare.sh
old mode 100644
new mode 100755
similarity index 84%
rename from wally/suits/mysql/tpcc/prepare.sh
rename to wally/suits/mysql/prepare.sh
index c5043ad..13804d3
--- a/wally/suits/mysql/tpcc/prepare.sh
+++ b/wally/suits/mysql/prepare.sh
@@ -1,5 +1,8 @@
 #!/bin/bash
 # install and configure mysql
+set -e
+set -x
+
 DATABASE_PASSWORD=wally
 DATBASE_USER=root
 DB_NAME=tpcc
@@ -16,8 +19,8 @@
 apt-get install -y make
 
 # disable mysql profile in apparmor
-sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
-sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
+#sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
+#sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
 
 # allows us not to access mysql without specifying password
 cat <<EOF >$HOME/.my.cnf
@@ -28,7 +31,7 @@
 EOF
 
 cd ~
-apt-get install bzr
+apt-get -y install bzr
 bzr branch lp:~percona-dev/perconatools/tpcc-mysql
 cd tpcc-mysql/src
 make
diff --git a/wally/suits/mysql/run.sh b/wally/suits/mysql/run.sh
new file mode 100755
index 0000000..284bc1e
--- /dev/null
+++ b/wally/suits/mysql/run.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+set -e
+set -x
+
+DATABASE_PASSWORD=wally
+DATBASE_USER=root
+DB_NAME=tpcc
+
+cd ~/tpcc-mysql
+./tpcc_start -h127.0.0.1 "-d$DB_NAME" "-u$DATBASE_USER" "-p$DATABASE_PASSWORD" -w20 -c16 -r10 -l1200 > ~/tpcc-output.log
+echo "TpmC:" `cat ~/tpcc-output.log | grep  TpmC | grep -o '[0-9,.]\+'`
\ No newline at end of file
diff --git a/wally/suits/mysql/tpcc/run.sh b/wally/suits/mysql/tpcc/run.sh
deleted file mode 100644
index 3d0f6f7..0000000
--- a/wally/suits/mysql/tpcc/run.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-cd ~/tpcc-mysql
-./tpcc_start -h127.0.0.1 -dtpcc1000 -uroot -p -w20 -c16 -r10 -l1200 > ~/tpcc-output.log
-cat ~/tpcc-output.log | grep  TpmC | grep -o '[0-9,.]\+'
\ No newline at end of file
