Mysql config not working
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
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
Support Staff 1 Posted by potsky on 04 Feb, 2017 06:47 AM
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 Posted by dgs on 04 Feb, 2017 03:40 PM
You are right, I tinkered with it and got it working. Thanks, great program!