[root@localhost src]# cd DBI-1.601
[root@localhost DBI-1.601]# perl Makefile.PL
[root@localhost DBI-1.601]# make
[root@localhost DBI-1.601]# make test
[root@localhost DBI-1.601]# make install
安装Data-ShowTable
[root@localhost src]# cd Data-ShowTable-3.3
[root@localhost Data-ShowTable-3.3]# perl Makefile.PL
[root@localhost Data-ShowTable-3.3]# make (注:第一次make出错,再make多几次)[root@localhost Data-ShowTable-3.3]# make install (注:无需make test)
安装DBD-mysql
[root@localhost src]# cd DBD-mysql-3.0007_1
[root@localhost DBD-mysql-3.0007_1]# perl Makefile.PL --libs="-L/usr/local/mysql-6.0.9-alhpa/lib/mysql -lmysqlclient -lz -lrt -lcrypt -lnsl -lm" --cflags=" -I/usr/local/mysql-6.0.9-alpha/include/mysql -g -DUNIV_LINUX" --testuser=root --testsocket=/home/cserken/mysql/tmp/mysql.sock
[root@localhost DBD-mysql-3.0007_1]# make
[root@localhost DBD-mysql-3.0007_1]# make test
[root@localhost DBD-mysql-3.0007_1]# make install
安装完毕
注意:make test之前mysql server要启动,并且要知道server的socket。本文在调试模式下启动mysql server,可获取到socket。
[root@localhost src]# cd /usr/local/mysql-6.0.9-alpha (mysql 安装路径)
[root@localhost mysql-6.0.9-alpha]# gdb libexec/mysqld
(gdb) r --user=root
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/mysql-6.0.9-alpha/libexec/mysqld --user=root
[Thread debugging using libthread_db enabled]
[New Thread -1208408368 (LWP 3545)]
[New Thread -1208411248 (LWP 3546)]
[Thread -1208411248 (LWP 3546) exited]
[New Thread -1235683440 (LWP 3547)]
091012 8:47:30 [Note] Event Scheduler: Loaded 0 events
091012 8:47:30 [Note] /usr/local/mysql-6.0.9-alpha/libexec/mysqld: ready for connecti**.
Version: '6.0.9-alpha-debug-log' socket: '/home/cserken/mysql/tmp/mysql.sock' (这个就是socket)
另外,在启动测试脚本的时候,需要指定soket路径
[root@localhost sql-bench]# ./test-insert-using-btree-short --socket='/home/cserken/mysql/tmp/mysql.sock'
Testing server 'MySQL 6.0.9 alpha debug log' at 2009-10-12 9:54:04
Testing the speed of inserting data into 1 table and do some selects on it.
The tests are done with a table that has 100000 rows.
Generating random keys
Creating tables
Inserting 100000 rows in order
Inserting 100000 rows in reverse order
Inserting 100000 rows in random order
Time for insert (300000): 180 wallclock secs (11.30 usr 8.12 sys + 0.00 cusr 0.00 csys = 19.42 CPU)