Hi,

You could do something like tail -n25 /var/log/mysqld.log | mail -s
"Database Logs" [EMAIL PROTECTED], and run it in cron.  For logging, if you
want to log queries, you would use mysqld --log=/var/log/queries.log, but
I'm not sure this is the type of logging you're looking for.

What might be a better idea, is do the mysqldump, dump everything to a text
file, then, at the end of the text file, append the date so that it looks
like:

INSERT INTO....
03/13/2004

Then, just tail the last 10 lines of the text file, and you can verify a
couple lines of data as well as the current date.  Worse case, you have to
restore that data, you just have to remove the date.

Hope this helps,
Richard

-----Original Message-----
From: Jai Jones [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 13, 2004 8:13 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] MySQL Logging

Hi,

Sorry if this the wrong list, I am a little confused on how to get MySQL 
logging working, I am hoping some PHP users are doing something like this.

I am backing up my MySQL data using a shell script and mysqldump. I would 
like to be able to send an email notification to myself to know that the 
dump worked.

My idea is tac'ing or tail'ing the last few entries of a mysql (or 
mysqldump?) log and pipping it to email. Does this sound like a good idea?

It appears my server is not logging by default, how do I enable a log that 
would store this info, or am I looking at this the wrong way.

All help is kindly appreciated.

Thankyou :)
JJ

_________________________________________________________________
MSN Messenger: instale grátis e converse com seus amigos. 
http://messenger.msn.com.br

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to