MySQL log
How about working with MySQL log? Is there a way?
I found nothing about this in the KB.
Congratulations for this great tool!
Comments are currently closed for this discussion. You can start a new one.
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 20 Feb, 2015 11:21 AM
Hi !
If course MySQL logs are supported. Do you want to build the configuration file ? There is a special tool to help you, more informations here : http://pimpmylog.com/developer/debug.html
If you don't know what a regex is, give me some MySQL logs here and I will help you next week when returning at home next to my ski holidays :-)
Please support Pimp My Log by starring the project in Github if not already done !
Potsky
www.potsky.com
Do you Pimp my Log ?
2 Posted by Luis Molina on 20 Feb, 2015 11:28 AM
thank you for your quick answer!
I will try to configure MySQL logs myself with that special tool. You will be noticed about me if I run in problems :)
Enjoy the holidays!
Luis
Support Staff 3 Posted by potsky on 20 Feb, 2015 11:32 AM
Ok!
And don't hesitate to send your configuration file to share it in the KB !
Potsky
www.potsky.com
Do you Pimp my Log ?
4 Posted by Luis Molina on 24 Feb, 2015 12:14 AM
Hello again, Potsky,
I've tried to read MySQL logs with the test tool with no success... I think I've
my regex knowledge a little bit "rusty"...
This is an example of MySQL error log:
150224 0:53:14 [Note] /usr/sbin/mysqld: Normal shutdown
150224 0:53:14 [Note] Event Scheduler: Purging the queue. 0 events
150224 0:53:14 InnoDB: Starting shutdown...
150224 0:53:15 InnoDB: Shutdown completed; log sequence number 102240466
150224 0:53:15 [Note] /usr/sbin/mysqld: Shutdown complete
150224 00:53:15 mysqld_safe mysqld from pid file /var/run/mysql/mysqld.pid ended
150224 00:53:26 mysqld_safe Starting mysqld daemon with databases from
/dbs/mysql
150224 0:53:26 InnoDB: The InnoDB memory heap is disabled
150224 0:53:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150224 0:53:26 InnoDB: Compressed tables use zlib 1.2.7
150224 0:53:26 InnoDB: Initializing buffer pool, size = 128.0M
150224 0:53:26 InnoDB: Completed initialization of buffer pool
150224 0:53:26 InnoDB: highest supported file format is Barracuda.
150224 0:53:26 InnoDB: Waiting for the background threads to start
150224 0:53:27 InnoDB: 5.5.31 started; log sequence number 102240466
150224 0:53:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150224 0:53:27 [Note] - '0.0.0.0' resolves to '0.0.0.0';
150224 0:53:27 [Note] Server socket created on IP: '0.0.0.0'.
150224 0:53:27 [Note] Event Scheduler: Loaded 0 events
150224 0:53:27 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.31-log' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source
distribution
This is the regex:
|^(.*)-(.*):(.*):(.*) (.*) (.*)$|U
This is the Match field:
{
"Date":1,
"Time":2,
"Module"3,
"Log":4
}
And this is the Types field:
{
"Date":"date:d\/m\/Y\/100",
"Time":"date:H:i:s\/100",
"Module":"txt",
"Log":"txt"
}
Any help is appreciated. Thanks in advance.
Luis
Support Staff 5 Posted by potsky on 24 Feb, 2015 11:14 AM
You should try this configuration :
6 Posted by Luis Molina on 24 Feb, 2015 12:28 PM
Hello potsky,
I’ve tried your configuration in config.user.php and also in http://myserver/PimpMyLog/inc/test.php#retestertab with no success.
The Regex tester shows “Unexpected token <” (without quotes).
Thanks four your attention.
De: potsky [mailto:[email blocked]]
Enviado el: martes, 24 de febrero de 2015 12:14
Para: [email blocked]
Asunto: [Pimp my Log] MySQL log (Suggestions #66)
Support Staff 7 Posted by potsky on 24 Feb, 2015 05:19 PM
You need to put the fragment I have sent to you in your main configuration file, right ?
If you have done this, could you send me your full configuration file please ?
8 Posted by Luis Molina on 24 Feb, 2015 05:36 PM
yes, I’ve put that fragment in my main configuration file.
Please find the attached files.
Luis
De: potsky [mailto:[email blocked]]
Enviado el: martes, 24 de febrero de 2015 18:20
Para: [email blocked]
Asunto: [Pimp my Log] MySQL log (Suggestions #66)
Support Staff 9 Posted by potsky on 24 Feb, 2015 06:01 PM
json is not correct.
Get the attached file instead...
10 Posted by Luis Molina on 24 Feb, 2015 11:05 PM
Thank you ! Now I can enter the "MySQL error" log screen but it doesn't find
the log file:
File /var/log/mysql/mysqld.log for file ID mysql1 does not exist, please review
your configuration file.
The file exists, as you can see below:
-rw-r--r-- 1 mysql mysql 0 Feb 24 12:15 /var/log/mysql/mysqld.log
Support Staff 11 Posted by potsky on 25 Feb, 2015 06:24 AM
The file is readable but not parent directories.
Check manually or use the debugger to find which directory has not the RX flag.
http://X.X.X.X/..../PimpMyLog//inc/test.php#configurationtab
12 Posted by Luis Molina on 26 Feb, 2015 06:10 PM
yes! That was the problem: the directory /var/log/mysql didn’t allow access.
Now I’ve fix the permissions and I can see the mysqld.log in PimpMyLog.
Thank you very much!
Luis
De: potsky [mailto:[email blocked]]
Enviado el: miércoles, 25 de febrero de 2015 7:25
Para: [email blocked]
Asunto: [Pimp my Log] MySQL log (Suggestions #66)
Support Staff 13 Posted by potsky on 26 Feb, 2015 06:42 PM
Nice !
potsky closed this discussion on 26 Feb, 2015 06:42 PM.