mystat 更新1.1.1

5 月 14th, 2010 | Posted by | Filed under 程序设计

本文内容遵从CC版权协议, 可以随意转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明
网址: http://www.penglixun.com/tech/program/mystat_update_20100514.html

修复了一个重大Bug,强烈建议更新。

原来有的用户报告说mysql客户端可以连上,但是mystat连不上,报没权限。
经过不断的定位,发现是个很扯淡和低级的错误:
为了统一处理参数,我将所有输入的参数小写处理了,结果,password也被小写了!所以密码中有大写的都连不上!
非常非常低级的错误。

目前支持的操作系统:
Windows/Linux/Unix
要求:
Perl 5以上,DBD::mysql、Switch、strict、Getopt::Std、Term::ANSIColor模块。

  mystat.pl (56.8 KiB, 5,478 hits)

标签:
  1. ruochen
    9 月 29th, 201013:10

    centos 5系列报告下面的错误

    -bash-3.1# perl mystat.pl -n traffic,qcache,kbuffer,sort -d var -h 127.0.0.1
    Number found where operator expected at mystat.pl line 1656, near “case 0”
    (Do you need to predeclare case?)
    syntax error at mystat.pl line 1654, near “) {”
    Execution of mystat.pl aborted due to compilation errors.

    -bash-3.1# cat /etc/redhat-release
    CentOS release 5 (Final)
    -bash-3.1# uname -a
    Linux dbtest.lfm-agile.com.hk 2.6.18-194.8.1.el5 #1 SMP Thu Jul 1 19:07:06 EDT 2010 i686 i686

    i386 GNU/Linux

    [回复]

    P.Linux 回复:

    perl -MCPAN -e shell “install Switch”
    缺少Switch模块

    [回复]

    jim 回复:

    root@debian:/tmp# perl mystat.pl -n traffic, qcache, kbuffer, sort -d var -h 127.0.0.1 -u root -p root
    Unrecognized character \xEF in column 1 at mystat.pl line 1.
    请问这个错误是什么原因?

    [回复]

  2. yayaw
    3 月 13th, 201209:30

    哥们,你这个刷新太疯狂了,在改进改进吧。。一闪一闪的,头晕呢。

    [回复]

  3. panzhc
    11 月 21st, 201317:12

    哥,你这个文件不完整吧,看看最后一行

    [回复]

  4. panzhc
    11 月 21st, 201317:33

    不好意思不能编辑之前的评论,只能再发一条,工具很不错,反馈几个小问题,最后一行的}没了,还有用户名写死了,这里会报错,还有mysql连的时候,如果改过mysql.sock的路径,最好用IP连。

    [回复]