Mysql config not working

dgs's Avatar

dgs

04 Feb, 2017 01:34 AM

This is my config file. When I run it on the regex tester, I see:

#1 2017-02-03T17:22:53.537210-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_activated' LIMIT 1
   Date : ERROR ! Unable to convert this string to date : --::.
   Thread_Id :
   Command_Type:
   Query_Body :

When I run it on live server, I get:

Oups!

Fatal error: Maximum execution time of 7 seconds exceeded in /Users/riskiii/Sites/pimp-my-log/vendor/potsky/pimp-my-log/inc/classes/LogParser.php on line 86

"mysql4": {
        "display" : "Mysql #4",
        "path" : "\/usr\/local\/var\/mysql\/mysql.log",
        "format" : {
            "multiline": "",
            "regex" : "|^(.{4})-(.{2})-(.{5}):(.{2}):(.{2}).(.{6})(.{6}) (.*) (.*) (.*)$|U",
            "match" : {
                "Date" : [
                    1,
                    "-",
                    2,
                    "-",
                    3,
                    ":",
                    4,
                    ":",
                    5,
                    ".",
                    6,
                    "",
                    7
                 ],
                "Thread_Id" : 8,
                "Command_Type" : 9,
                "Query_Body" : 10
            },
            "types" : {
                "Date" : "date:Y-m-dTH:i:uP",
                "Thread_Id" : "txt",
                "Command_Type" : "txt",
                "Query_Body" : "txt"
            }
        }
    }

2017-02-03T17:22:53.506973-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'theme_switched' LIMIT 1
2017-02-03T17:22:53.535517-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'updraft_restore_in_progress' LIMIT 1
2017-02-03T17:22:53.536016-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_uptime_robot_monitors_activated' LIMIT 1
2017-02-03T17:22:53.536273-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_favorites_extension_activated' LIMIT 1
2017-02-03T17:22:53.536552-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_updraftplus_backups_extension_activated' LIMIT 1
2017-02-03T17:22:53.536844-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_wordfence_extension_activated' LIMIT 1
2017-02-03T17:22:53.537210-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_activated' LIMIT 1
2017-02-03T17:22:53.547551-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_backup_before_upgrade' LIMIT 1
2017-02-03T17:22:53.549333-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_hide_twitters_message' LIMIT 1
2017-02-03T17:22:53.549771-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_maximumSyncRequests' LIMIT 1
2017-02-03T17:22:53.550324-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_maximumInstallUpdateRequests' LIMIT 1
2017-02-03T17:22:53.558272-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mwp_setup_hide_wp_menus' LIMIT 1
2017-02-03T17:22:53.558661-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_getting_started' LIMIT 1
2017-02-03T17:22:53.558984-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = '_transient_timeout__mainwp_activation_redirect' LIMIT 1
2017-02-03T17:22:53.559229-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = '_transient__mainwp_activation_redirect' LIMIT 1
2017-02-03T17:22:53.561087-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'mainwp_updraftplus_plugin_option' LIMIT 1
2017-02-03T17:22:53.575384-06:00 177 Query SELECT option_value FROM mwp_options WHERE option_name = 'external_updates-updraftplus' LIMIT 1

  1. Support Staff 1 Posted by potsky on 04 Feb, 2017 06:47 AM

    potsky's Avatar

    Hello,

    the regex is not correct, the date does not match. I do not have a computer to help you but check the regex

  2. 2 Posted by dgs on 04 Feb, 2017 03:40 PM

    dgs's Avatar

    You are right, I tinkered with it and got it working. Thanks, great program!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac