{
    "mode": "man",
    "parameter": "mysqlreport",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/mysqlreport/1/json",
    "generated": "2026-06-15T14:25:23Z",
    "sections": {
        "NAME": {
            "content": "mysqlreport - Makes a friendly report of important MySQL status values\n",
            "subsections": []
        },
        "SYNTAX": {
            "content": "mysqlreport [options]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "mysqlreport  makes  a  friendly report of important MySQL status values. Actually, it makes a\nfriendly report of nearly every status value from SHOW STATUS.  Unlike SHOW STATUS which sim‐\nply  dumps over 100 values to screen in one long list, mysqlreport interprets and formats the\nvalues and presents the basic values and many more inferred values in a  human-readable  for‐\nmat.  Numerous  example  reports  are  available  at the mysqlreport web page at http://hack‐\nmysql.com/mysqlreport.\n\nThe benefit of mysqlreport is that it allows you to very quickly see a wide array of  perfor‐\nmance  indicators  for  your MySQL server which would otherwise need to be calculated by hand\nfrom all the various SHOW STATUS values. For example, the Index Read Ratio  is  an  important\nvalue  but it's not present in SHOW STATUS; it's an inferred value (the ratio of Keyreads to\nKeyreadrequests).\n\nThis documentation outlines all the command line options in mysqlreport, most of  which  con‐\ntrol  which  reports  are  printed. This document does not address how to interpret these re‐\nports; that  topic  is  covered  in  the  document  Guide  To  Understanding  mysqlreport  at\nhttp://hackmysql.com/mysqlreportguide.\n\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "Technically,  command  line  options are in the form --option, but -option works too. All op‐\ntions can be abbreviated if the abbreviation is unique. For example, option --host can be ab‐\nbreviated --ho but not --h because --h is ambiguous: it could mean --host or --help.\n\n\n--help Output help information and exit.\n\n",
            "subsections": [
                {
                    "name": "--user USER",
                    "content": "",
                    "long": "--user",
                    "arg": "USER"
                },
                {
                    "name": "--password",
                    "content": "As  of  version 2.3 --password can take the password on the command line like \"--pass‐\nword FOO\". Using --password alone without giving a password on the command line causes\nmysqlreport to prompt for a password.\n\n",
                    "long": "--password"
                },
                {
                    "name": "--host ADDRESS",
                    "content": "",
                    "long": "--host",
                    "arg": "ADDRESS"
                },
                {
                    "name": "--port PORT",
                    "content": "",
                    "long": "--port",
                    "arg": "PORT"
                },
                {
                    "name": "--socket SOCKET",
                    "content": "",
                    "long": "--socket",
                    "arg": "SOCKET"
                },
                {
                    "name": "--no-mycnf",
                    "content": "--no-mycnf  makes  mysqlreport  not read ~/.my.cnf which it does by default otherwise.\n--user and --password always override values from ~/.my.cnf.\n\n\n--dtq  Print Distribution of Total Queries (DTQ) report (under Total  in  Questions  report).\nQueries  (or  Questions)  can  be divided into four main areas: DMS (see --dms below),\nCom  (see  --com  below),  COMQUIT  (see  COMQUIT  and  Questions  at  http://hack‐\nmysql.com/comquit),  and  Unknown. --dtq lists the number of queries in each of these\nareas in descending order.\n\n\n--dms  Print Data Manipulation Statements (DMS) report (under DMS in Questions  report).  DMS\nare  those  from  the  MySQL manual section 13.2. Data Manipulation Statements.  (Cur‐\nrently, mysqlreport considers only SELECT, INSERT, REPLACE, UPDATE, and DELETE.)  Each\nDMS is listed in descending order by count.\n\n",
                    "long": "--no-mycnf"
                },
                {
                    "name": "--com N",
                    "content": "Print  top  N  number  of non-DMS Com status values in descending order (after DMS in\nQuestions report). If N is not given, default is 3. Such non-DMS Com  values  include\nComchangedb, Comshowtables, Comrollback, etc.\n\n\n--sas  Print  report  for Select and Sort status values (after Questions report). See MySQL\nSelect and Sort Status Variables at http://hackmysql.com/selectandsort.\n\n\n--tab  Print Threads, Aborted, and Bytes status reports (after Created temp  report).  As  of\nmysqlreport v2.3 the Threads report reports on all Threads status values.\n\n",
                    "long": "--com"
                },
                {
                    "name": "--qcache",
                    "content": "Print Query Cache report.\n\n--all  Equivalent  to  \"--dtq --dms --com 3 --sas --qcache\".  (Notice --tab is not invoked by\n--all.)\n\n",
                    "long": "--qcache"
                },
                {
                    "name": "--infile FILE",
                    "content": "Instead of getting SHOW STATUS values from MySQL, read values from FILE. FILE is often\na copy of the output of SHOW STATUS including formatting characters (|, +, -).  mysql‐\nreport expects FILE to have the format \" value number \" where value is only alpha  and\nunderscore  characters  (A-Z and ) and number is a positive integer. Anything before,\nbetween, or after value and number is ignored. mysqlreport also  needs  the  following\nMySQL   server  variables:  version,  tablecache,  maxconnections,  keybuffersize,\nquerycachesize. These values can be specified in INFILE in the format \"name = value\"\nwhere name is one of the aforementioned server variables and value is a positive inte‐\nger with or without a trailing M and possible periods (for version). For  example,  to\nspecify  an  18M  keybuffersize:  keybuffersize  = 18M. Or, a 256 tablecache: ta‐\nblecache = 256. The M implies Megabytes not million,  so  18M  means  18,874,368  not\n18,000,000.  If  these  server  variables are not specified the following defaults are\nused (respectively) which may cause strange values to be reported: 0.0.0, 64, 100, 8M,\n0.\n\n",
                    "long": "--infile",
                    "arg": "FILE"
                },
                {
                    "name": "--outfile FILE",
                    "content": "After  printing the report to screen, print the report to FILE too. Internally, mysql‐\nreport always writes the report to a temp file first:  /tmp/mysqlreport.PID  on  *nix,\nc:sqlreport.PID  on  Windows (PID is the script's process ID). Then it prints the temp\nfile to screen. Then if --outfile is specified, the temp file is  copied  to  OUTFILE.\nAfter --email (below), the temp file is deleted.\n\n",
                    "long": "--outfile",
                    "arg": "FILE"
                },
                {
                    "name": "--email ADDRESS",
                    "content": "After printing the report to screen, email the report to ADDRESS. This option requires\nsendmail in /usr/sbin/, therefore it does not work on Windows.  /usr/sbin/sendmail can\nbe  a  sym  link to qmail, for example, or any MTA that emulates sendmail's -t command\nline option and operation. The FROM: field is \"mysqlreport\", SUBJECT: is \"MySQL status\nreport\".\n\n",
                    "long": "--email",
                    "arg": "ADDRESS"
                },
                {
                    "name": "--flush-status",
                    "content": "Execute  a  \"FLUSH  STATUS;\" after generating the reports.  If you do not have permis‐\nsions in MySQL to do this an error from DBD::mysql::st will be printed after  the  re‐\nports.\n\n",
                    "long": "--flush-status"
                }
            ]
        },
        "AUTHORS": {
            "content": "Daniel Nichter\n\nIf mysqlreport breaks, send me a message from http://hackmysql.com/feedback with the error.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "mytop(1)\n\nThe  comprehensive  Guide  To  Understanding mysqlreport at http://hackmysql.com/mysqlreport‐\nguide.\n\n\n\n\nDaniel Nichter                   2.5 2006-09-01 (docrev 2006-05-19)                   mysqlreport(1)",
            "subsections": []
        }
    },
    "summary": "mysqlreport - Makes a friendly report of important MySQL status values",
    "flags": [
        {
            "flag": "",
            "long": "--user",
            "arg": "USER",
            "description": ""
        },
        {
            "flag": "",
            "long": "--password",
            "arg": null,
            "description": "As of version 2.3 --password can take the password on the command line like \"--pass‐ word FOO\". Using --password alone without giving a password on the command line causes mysqlreport to prompt for a password."
        },
        {
            "flag": "",
            "long": "--host",
            "arg": "ADDRESS",
            "description": ""
        },
        {
            "flag": "",
            "long": "--port",
            "arg": "PORT",
            "description": ""
        },
        {
            "flag": "",
            "long": "--socket",
            "arg": "SOCKET",
            "description": ""
        },
        {
            "flag": "",
            "long": "--no-mycnf",
            "arg": null,
            "description": "--no-mycnf makes mysqlreport not read ~/.my.cnf which it does by default otherwise. --user and --password always override values from ~/.my.cnf. --dtq Print Distribution of Total Queries (DTQ) report (under Total in Questions report). Queries (or Questions) can be divided into four main areas: DMS (see --dms below), Com (see --com below), COMQUIT (see COMQUIT and Questions at http://hack‐ mysql.com/comquit), and Unknown. --dtq lists the number of queries in each of these areas in descending order. --dms Print Data Manipulation Statements (DMS) report (under DMS in Questions report). DMS are those from the MySQL manual section 13.2. Data Manipulation Statements. (Cur‐ rently, mysqlreport considers only SELECT, INSERT, REPLACE, UPDATE, and DELETE.) Each DMS is listed in descending order by count."
        },
        {
            "flag": "",
            "long": "--com",
            "arg": null,
            "description": "Print top N number of non-DMS Com status values in descending order (after DMS in Questions report). If N is not given, default is 3. Such non-DMS Com values include Comchangedb, Comshowtables, Comrollback, etc. --sas Print report for Select and Sort status values (after Questions report). See MySQL Select and Sort Status Variables at http://hackmysql.com/selectandsort. --tab Print Threads, Aborted, and Bytes status reports (after Created temp report). As of mysqlreport v2.3 the Threads report reports on all Threads status values."
        },
        {
            "flag": "",
            "long": "--qcache",
            "arg": null,
            "description": "Print Query Cache report. --all Equivalent to \"--dtq --dms --com 3 --sas --qcache\". (Notice --tab is not invoked by --all.)"
        },
        {
            "flag": "",
            "long": "--infile",
            "arg": "FILE",
            "description": "Instead of getting SHOW STATUS values from MySQL, read values from FILE. FILE is often a copy of the output of SHOW STATUS including formatting characters (|, +, -). mysql‐ report expects FILE to have the format \" value number \" where value is only alpha and underscore characters (A-Z and ) and number is a positive integer. Anything before, between, or after value and number is ignored. mysqlreport also needs the following MySQL server variables: version, tablecache, maxconnections, keybuffersize, querycachesize. These values can be specified in INFILE in the format \"name = value\" where name is one of the aforementioned server variables and value is a positive inte‐ ger with or without a trailing M and possible periods (for version). For example, to specify an 18M keybuffersize: keybuffersize = 18M. Or, a 256 tablecache: ta‐ blecache = 256. The M implies Megabytes not million, so 18M means 18,874,368 not 18,000,000. If these server variables are not specified the following defaults are used (respectively) which may cause strange values to be reported: 0.0.0, 64, 100, 8M, 0."
        },
        {
            "flag": "",
            "long": "--outfile",
            "arg": "FILE",
            "description": "After printing the report to screen, print the report to FILE too. Internally, mysql‐ report always writes the report to a temp file first: /tmp/mysqlreport.PID on *nix, c:sqlreport.PID on Windows (PID is the script's process ID). Then it prints the temp file to screen. Then if --outfile is specified, the temp file is copied to OUTFILE. After --email (below), the temp file is deleted."
        },
        {
            "flag": "",
            "long": "--email",
            "arg": "ADDRESS",
            "description": "After printing the report to screen, email the report to ADDRESS. This option requires sendmail in /usr/sbin/, therefore it does not work on Windows. /usr/sbin/sendmail can be a sym link to qmail, for example, or any MTA that emulates sendmail's -t command line option and operation. The FROM: field is \"mysqlreport\", SUBJECT: is \"MySQL status report\"."
        },
        {
            "flag": "",
            "long": "--flush-status",
            "arg": null,
            "description": "Execute a \"FLUSH STATUS;\" after generating the reports. If you do not have permis‐ sions in MySQL to do this an error from DBD::mysql::st will be printed after the re‐ ports."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "mytop",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mytop/1/json"
        }
    ]
}