Home     PHP / Javascript / Ajax
PHP MySQL Log Parser Script

PHP Script Codes > database-tools

MySQL Log Parser Free

Rate: | Price: Free | Publisher: Office Site | Demo: | Views: 1624

PHP Script Codes > MySQL Log Parser
This a is a simple PHP command line utility that will parse a MySQL update log file and dump only updates to a particular database in a certain time interval. Currently there are no flags, you are prompted for all input. Usage:

bash-2.05$ php mysql_log_parser.php Enter the path to the log file to be processed:/path/to/update log.nnn
Enter the name of the database to extract:MyDB
Start Time (T= current time - your input here):864000
End Time (T = current time - your input here):35000
Enter the path to the output file:output.log

This would output the all update statements on the MyDB database during the time interval (864000 seconds ago, 35000 seconds ago).