Install mysqlreport in Linux

Source: Internet
Author: User
Tags socket connect install perl
1. perl installation [root@oraclemysqlreport-3.4a] # perl-vThisisperl, v5.8.5builtfori386-linux-thread-multiCopyright1987-20

1. Install perl [root @ oracle mysqlreport-3.4a] # perl-vThis is perl, v5.8.5 built for i386-linux-thread-multiCopyright 1987-20

1. Install perl
[Root @ Oracle mysqlreport-3.4a] # perl-v

This is perl, v5.8.5 built for i386-linux-thread-multi

Copyright 1987-2004, Larry Wall

Perl may be copied only under the terms of either the Artistic License or
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, shocould be found on
This system using 'man perl 'or 'perldoc perl'. If you have access to
Internet, point your browser at, the Perl Home Page.

Perl is installed by default during linux installation.

2. Install mysql
Omitted. There are many types of introductions on the Internet.

3. Install DBI
To download the corresponding version
# Tar zxf DBI-1.58.tar.gz
# Cd DBI-1.58
# Perl Makefile. pl
# Make
# Make test
# Make
# Make install

4. data-showtable package
Find the corresponding package
Gzip-c-d Data-ShowTable -?.??. Tar.gz | tar xvf-
Cd Data-ShowTable -?.??
Perl Makefile. PL
Make
Do not try make test. The test suite is damaged!
Make install


5. msql-mysql-modules
Gzip-c-d Msql-Mysql-modules -?.??. Tar.gz | tar xvf-
Compress the compressed file to a file named Msql-Mysql-modules -?.?? Directory.
Cd Msql-Mysql-modules -?.??
Perl Makefile. PL
You will be asked some questions during "perl Makefile. PL. In particular, you must choose to install the drive (MySQL, mSQL2 and/or mSQL1 ). The MySQL driver is called

DBD: mysql. The separate mSQL driver is DBD: mSQL. If you want to support mSQL1 and mSQL2, use DBD: mSQL1.
Make
Make test
Make install
Now you can use DBI to program MySQL!

6. DBD-mysql
Install DBD: DBD-mysql-4.005
# Perl Makefile. PL -- mysql_config =/usr/local/mysql/bin/mysql_config
# Make
# Make test
# Make
# Make install

If the following error occurs,
Install_driver (mysql) failed: Can't load '/usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi/auto/DBD/mysql. so'

Module DBD: mysql: libmysqlclient. so.12: cannot open shared object file: No such file or directory

/Usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader. pm line 230.
At (eval 6) line 3
Compilation failed in require at (eval 6) line 3.
Perhaps a required shared library or dll isn' t installed where expected
At/root/mysqlreport line 162

Just do the operation
# Cp/usr/local/mysql/include/mysql */usr/include/
# Cp/usr/local/mysql/lib/*/usr/lib/(64-bit lib64)

Then reinstall the DBD: DBD-mysql-4.005
# Perl Makefile. PL -- mysql_config =/usr/local/mysql/bin/mysql_config
# Make
# Make test
# Make install

7. Install mysqlreport

Cd/usr/local/sbin
Wget hackmysql.com/scripts/mysqlreport
Chmod 755 mysqlreport
Cd/

[Root @ oracle mysqlreport-3.4a] #./mysqlreport -- help
Mysqlreport v3.4a Jan 23 2008
Mysqlreport makes an easy-to-read report of important MySQL status values.

Command line options (abbreviations work ):
-- User USER Connect to MySQL as USER
-- Password PASS Use PASS or prompt for MySQL user's password
-- Host ADDRESS Connect to MySQL at ADDRESS
-- Port PORT Connect to MySQL at PORT
-- Socket SOCKET Connect to MySQL at SOCKET
-- No-mycnf Don't read ~ /. My. cnf
-- Infile FILE Read status values from FILE instead of MySQL
-- Outfile FILE Write report to FILE
-- Email ADDRESS Email report to ADDRESS (doesn't work on Windows)
-- Flush-status Issue flush status; after getting current values
-- Relative X Generate relative reports. If X is an integer,
Reports are live from the MySQL server X seconds apart.
If X is a list of infiles (file1 file2 etc .),
Reports are generated from the infiles in the order
That they are given.
-- Report-count N Collect N number of live relative reports (default 1)
-- Detach Fork and detach from terminal (run in background)
-- Help Prints this
-- Debug Print debugging information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.