FW: RE: [PHP-DB] MySQL Logging

From: Date: Sat, 13 Mar 2004 13:57:18 +0000
Subject: FW: RE: [PHP-DB] MySQL Logging
Groups: php.db 
Request: Send a blank email to php-db+get-33439@lists.php.net to get a copy of this message
Thanks very much Richard. I planned to do that exact thing ;) but there is no log file on my server, logging must not be enabled. I read about the log switch you can pass while starting mysql, do I edit a script in rc.d or can this setting be set in my.cnf? Kind regards, JJ
From: "Richard Bewley" <rbewley@friend.ly.net> To: <php-db@lists.php.net> Subject: RE: [PHP-DB] MySQL Logging Date: Sat, 13 Mar 2004 08:38:48 -0500 Hi, You could do something like tail -n25 /var/log/mysqld.log | mail -s "Database Logs" user@domain.com, 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
_________________________________________________________________ MSN Messenger: instale grátis e converse com seus amigos. http://messenger.msn.com.br

« previous php.db (#33439) next »