Website:
Http://imysql.com/wp-content/uploads/2014/09/tpcc-mysql-src.tgz
1. Download the package with the BZR client
[email protected] ~]# Yum install bzr-y
[Email protected] ~]# BZR branch Lp:~percona-dev/perconatools/tpcc-mysql
[Email protected] ~]# CD tpcc-mysql/src/
[[email protected] src]# make
[[email protected] src]# CD.
[[email protected] tpcc-mysql]# ll
Total 252
-rw-r--r--. 1 root root 1621 APR 11:24 Add_fke Y_idx.sql
-rw-r--r--. 1 root root 317 Apr 11:24 count.sql
-rw-r--r--. 1 root root 3 Apr 11:24 create_table.sql
-rw-r--r--. 1 root root 763 Apr 11:24 drop_cons.sql
-rw-r--r- -. 1 root root 477 Apr 11:24 load.sh
-rw-r--r--. 1 root root 851 Apr 11:24 READM E
Drwxr-xr-x. 2 root root 4096 Apr 11:24 schema2
drwxr-xr-x. 5 root root 4096 Apr 23 11:2 4 Scripts
Drwxr-xr-x. 2 root root 4096 Apr 11:25 src
-rwxr-xr-x. 1 root root 61191 APR 23 11:25 Commands generated after tpcc_load --make
-rwxr-xr-x. 1 root root 155886 Apr 11:25 tpcc_ Commands generated after start --make
[Email protected] tpcc-mysql]#
2. Create a database Import table structure
[Email protected] tpcc-mysql]# mysqladmin create TPCC;
[[email protected] tpcc-mysql]# MySQL TPCC < create_table.sql
[Email protected] tpcc-mysql]#
3. Load test data (tpcc_load)
[Email protected] tpcc-mysql]#/tpcc_load--help
*************************************
# # #easy # # TPC-C Data Loader * * *
*************************************
usage:tpcc_load [Server] [DB] [user] [pass] [warehouse]
OR
tpcc_load [Server] [DB] [user] [pass] [warehouse] [part] [MIN_WH] [MAX_WH]
* [PART]: 1=items 2=warehouse 3=customer 4=orders
[[email protected] tpcc-mysql]#./tpcc_load localhost TPCC root "" 100--no fewer than 100 mechanical hardware warehouses, no less than 1000 SSD hardware
This article is from the "Days Together" blog, please be sure to keep this source http://tongcheng.blog.51cto.com/6214144/1637512
Tpcc-mysql of MySQL Performance testing tools