终于可以了,,,,
用到包的版本如下:
DBI-1.604.tar.gz
TermReadKey-2.30.tar.gz
DBD-mysql-4.006.tar.gz
我猜想估计是原来用不同版本的DBI,DBD-mysql进行make/make install后,在你原来tar后的文件夹生成一些文件,然后我就把原来tar出来DBI,DBD-mysql的文件夹删了,重装来过一次就OK了
如下:
[root@uni-linux mytop-1.6]# tar -zxvf /home/DBD-mysql-4.006.tar.gz -C /opt DBD-mysql-4.006/
DBD-mysql-4.006/ChangeLog
DBD-mysql-4.006/constants.h
DBD-mysql-4.006/dbdimp.c
DBD-mysql-4.006/dbdimp.h
DBD-mysql-4.006/eg/
DBD-mysql-4.006/eg/._bug14979.pl
DBD-mysql-4.006/eg/bug14979.pl
DBD-mysql-4.006/eg/._bug21028.pl
DBD-mysql-4.006/eg/bug21028.pl
DBD-mysql-4.006/eg/bug30033.pl
DBD-mysql-4.006/eg/bug30033pg.pl
DBD-mysql-4.006/eg/decimal_test.pl
DBD-mysql-4.006/eg/issue21946.pl
DBD-mysql-4.006/eg/prepare_memory_usage.pl
DBD-mysql-4.006/eg/proc_example1.pl
DBD-mysql-4.006/eg/proc_example2.pl
DBD-mysql-4.006/eg/proc_example2a.pl
DBD-mysql-4.006/eg/proc_example2b.pl
DBD-mysql-4.006/eg/proc_example3.pl
DBD-mysql-4.006/eg/proc_example4.pl
DBD-mysql-4.006/INSTALL.html
DBD-mysql-4.006/lib/
DBD-mysql-4.006/lib/Bundle/
DBD-mysql-4.006/lib/Bundle/DBD/
DBD-mysql-4.006/lib/Bundle/DBD/mysql.pm
DBD-mysql-4.006/lib/DBD/
DBD-mysql-4.006/lib/DBD/mysql/
DBD-mysql-4.006/lib/DBD/mysql/GetInfo.pm
DBD-mysql-4.006/lib/DBD/mysql/INSTALL.pod
DBD-mysql-4.006/lib/DBD/mysql.pm
DBD-mysql-4.006/Makefile.PL
DBD-mysql-4.006/Makefile.PL.embedded
DBD-mysql-4.006/MANIFEST
DBD-mysql-4.006/MANIFEST.SKIP
DBD-mysql-4.006/META.yml
DBD-mysql-4.006/myld
DBD-mysql-4.006/mysql.xs
DBD-mysql-4.006/README
DBD-mysql-4.006/t/
DBD-mysql-4.006/t/00base.t
DBD-mysql-4.006/t/10connect.t
DBD-mysql-4.006/t/20createdrop.t
DBD-mysql-4.006/t/25lockunlock.t
DBD-mysql-4.006/t/30insertfetch.t
DBD-mysql-4.006/t/35limit.t
DBD-mysql-4.006/t/35prepare.t
DBD-mysql-4.006/t/40bindparam.t
DBD-mysql-4.006/t/40bindparam2.t
DBD-mysql-4.006/t/40blobs.t
DBD-mysql-4.006/t/40catalog.t
DBD-mysql-4.006/t/40keyinfo.t
DBD-mysql-4.006/t/40listfields.t
DBD-mysql-4.006/t/40nulls.t
DBD-mysql-4.006/t/40numrows.t
DBD-mysql-4.006/t/40server_prepare.t
DBD-mysql-4.006/t/40types.t
DBD-mysql-4.006/t/41bindparam.t
DBD-mysql-4.006/t/41blobs_prepare.t
DBD-mysql-4.006/t/42bindparam.t
DBD-mysql-4.006/t/50chopblanks.t
DBD-mysql-4.006/t/50commit.t
DBD-mysql-4.006/t/60leaks.t
DBD-mysql-4.006/t/65types.t
DBD-mysql-4.006/t/70takeimp.t
DBD-mysql-4.006/t/75supported_sql.t
DBD-mysql-4.006/t/80procs.t
DBD-mysql-4.006/t/insertid.t
DBD-mysql-4.006/t/lib.pl
DBD-mysql-4.006/t/multi_statement.t
DBD-mysql-4.006/t/mysql.dbtest
DBD-mysql-4.006/t/param_values.t
DBD-mysql-4.006/t/prepare_noerror.t
DBD-mysql-4.006/t/test.pl
DBD-mysql-4.006/t/test_data.txt
DBD-mysql-4.006/t/texecute.t
DBD-mysql-4.006/t/utf8.t
DBD-mysql-4.006/t/warnings.t
DBD-mysql-4.006/TODO
[root@uni-linux mytop-1.6]# cd /opt/DBD-mysql-4.006
[root@uni-linux DBD-mysql-4.006]# perl Makefile.PL --mysql_config=/usr/local/mysql/bin/mysql_config
I will use the following settings for compiling and testing:
cflags (mysql_config) = -I/usr/local/mysql/include
embedded (mysql_config) =
libs (mysql_config) = -L/usr/local/mysql/lib -lmysqlclient -lz -lcrypt -lnsl -lm
mysql_config (Users choice) = /usr/local/mysql/bin/mysql_config
nocatchstderr (default ) = 0
nofoundrows (default ) = 0
ssl (guessed ) = 0
testdb (default ) = test
testhost (default ) =
testpassword (default ) =
testsocket (default ) =
testuser (default ) =
To change these settings, see 'perl Makefile.PL --help' and
'perldoc INSTALL'.
Multiple copies of Driver.xst found in: /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/ /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/ at Makefile.PL line 739
Using DBI 1.604 (for perl 5.008005 on i386-linux-thread-multi) installed in /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/
Writing Makefile for DBD::mysql
[root@uni-linux DBD-mysql-4.006]# make
cp lib/DBD/mysql.pm blib/lib/DBD/mysql.pm
cp lib/DBD/mysql/GetInfo.pm blib/lib/DBD/mysql/GetInfo.pm
cp lib/DBD/mysql/INSTALL.pod blib/lib/DBD/mysql/INSTALL.pod
cp lib/Bundle/DBD/mysql.pm blib/lib/Bundle/DBD/mysql.pm
gcc -c -I/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI -I/usr/local/mysql/include -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DVERSION=\"4.006\" -DXS_VERSION=\"4.006\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" dbdimp.c
/usr/bin/perl -p -e "s/~DRIVER~/mysql/g" /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driver.xst > mysql.xsi
/usr/bin/perl /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap mysql.xs > mysql.xsc && mv mysql.xsc mysql.c
Warning: duplicate function definition 'do' detected in mysql.xs, line 225
Warning: duplicate function definition 'rows' detected in mysql.xs, line 612
gcc -c -I/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBI -I/usr/local/mysql/include -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -DVERSION=\"4.006\" -DXS_VERSION=\"4.006\" -fPIC "-I/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE" mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.so
/usr/bin/perl myld gcc -shared -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.so -L/usr/local/mysql/lib -lmysqlclient -lz -lcrypt -lnsl -lm
chmod 755 blib/arch/auto/DBD/mysql/mysql.so
cp mysql.bs blib/arch/auto/DBD/mysql/mysql.bs
chmod 644 blib/arch/auto/DBD/mysql/mysql.bs
Manifying blib/man3/DBD::mysql.3pm
Manifying blib/man3/DBD::mysql::INSTALL.3pm
Manifying blib/man3/Bundle:BD::mysql.3pm
[root@uni-linux DBD-mysql-4.006]# make install
Installing /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/mysql/mysql.so
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Writing /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/mysql/.packlist
Appending installation info to /usr/lib/perl5/5.8.5/i386-linux-thread-multi/perllocal.pod
[root@uni-linux DBD-mysql-4.006]# cd /opt/mytop-1.6
[root@uni-linux mytop-1.6]# perl Makefile.PL
Writing Makefile for mytop
[root@uni-linux mytop-1.6]# make
cp mytop blib/script/mytop
/usr/bin/perl "-MExtUtils::MY" -e "MY->fixin(shift)" blib/script/mytop
Manifying blib/man1/mytop.1
[root@uni-linux mytop-1.6]# make install
Writing /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/mytop/.packlist
Appending installation info to /usr/lib/perl5/5.8.5/i386-linux-thread-multi/perllocal.pod
[root@uni-linux mytop-1.6]# mytop -u root -p justin -P 3308
MySQL on localhost (5.1.22-rc-log) up 0+06:43:13 [17:35:41] Queries: 3.0 qps: 0 Slow: 0.0 Se/In/Up/De(%): 00/00/00/00
Key Efficiency: 100.0% Bps in/out: 0.0/ 0.3
Id User Host/IP DB Time Cmd Query or State
-- ---- ------- -- ---- --- ----------
1 root localhost test 0 Query show full process
MySQL on localhost (5.1.22-rc-log) up 0+06:43:18 [17:35:46] Queries: 5.0 qps: 0 Slow: 0.0 Se/In/Up/De(%): 00/00/00/00
qps now: 0 Slow qps: 0.0 Threads: 1 ( 1/ 0) 00/00/00/00
Key Efficiency: 100.0% Bps in/out: 0.0/ 0.3 Now in/out: 8.0/ 61.3
Id User Host/IP DB Time Cmd Query or State
-- ---- ------- -- ---- --- ----------
1 root localhost test 0 Query show full process
MySQL on localhost (5.1.22-rc-log) up 0+06:43:22 [17:35:50] Queries: 7.0 qps: 0 Slow: 0.0 Se/In/Up/De(%): 00/00/00/00
qps now: 0 Slow qps: 0.0 Threads: 1 ( 1/ 0) 00/00/00/00
Key Efficiency: 100.0% Bps in/out: 0.0/ 0.4 Now in/out: 9.5/ 72.4
Id User Host/IP DB Time Cmd Query or State
-- ---- ------- -- ---- --- ----------
1 root localhost test 0 Query show full process
MySQL on localhost (5.1.22-rc-log) up 0+06:43:24 [17:35:52] Queries: 9.0 qps: 0 Slow: 0.0 Se/In/Up/De(%): 00/00/00/00
qps now: 1 Slow qps: 0.0 Threads: 1 ( 1/ 0) 00/00/00/00
Key Efficiency: 100.0% Bps in/out: 0.0/ 0.4 Now in/out: 30.1/229.1
Id User Host/IP DB Time Cmd Query or State
-- ---- ------- -- ---- --- ----------
1 root localhost test 0 Query show full process
[root@uni-linux mytop-1.6]#
最后奇怪,mytop官方说.不适合MySQL5.0,我这边是可以的,呵呵