Log file size
I'm running mySQL on Linux and was wondering is there a way to limit the maximum log file size? From time to time I have written a bad script that will query mySQL in a loop (BTW - mySQL can do *lots* of queries/second!) without me realizing my mistake until I run out of room on my log partition which causes all kinds of Bad things to happen. I don't want to reduce the log detail, because normally my logs are just fine, just would like to be able to suspend logging when there is only x% of disk space left. Pete -- http://www.elbnet.com ELB Internet Services, Inc. Web Design, Computer Consulting, Internet Hosting - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: MySQL with perl
When a person submits a form that inserts a record into the database, if they then refresh the page that comes up after the submit, the record will be submitted a second time. I suppose this is due to the fact that the subroutine that is called with the submit contains both the write to database bit and the view bit. So refreshing causes a repeat of both items. How can I do this without that problem? Thanks in advance, Dawn H Two possible suggestions: 1) Provide a unique index field and catch the duplicate error if they try to resubmit the form. Then you can send them a nice Don't do that! message. 2) After the form is submitted redirect them to a second Thanks! page. They can reload that page all they want. Pete -- http://www.elbnet.com ELB Internet Services, Inc. Web Design, Computer Consulting, Internet Hosting - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Log file size
Kenneth Kopelson wrote: Look into the Linux logrotate daemon. It allows you to configure what happens with logs. That would work if the problem I'm looking to solve was predictable - i.e. I have a busy site and I run logrotate three times a day to make sure the logs haven't gotten too big. The problem I'm trying to solve is to avoid someone (either accidentally or intentionally) doing an unexpected DOS on any services that requires space on the log device to function correctly (i.e. kernel accounting, exim, mySQL, etc.) by making mySQL log a tremendous amount of data to its logs through rapid, successive queries. I was wondering if there was a way to have mySQL halt its logging (similar to the way the kernel does) if the log device gets too full or perhaps limit the total log file size. For example, Oracle will rotate a fixed number of redo logs based upon their size so I know what the absolute maximum total size of the logs will ever be and can provide space for them. My main concern here (and maybe I should report this to the bugs list) is that someone could DOS a server running mySQL fairly easily by hammering away at a dynamic Web page. Pete -- http://www.elbnet.com ELB Internet Services, Inc. Web Design, Computer Consulting, Internet Hosting - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: What is the for in ' safe_mysqld --log '
mysql list wrote: I lost track of the tutorial where I saw the command safe_mysqld --log The ampersand sends the process into the background. Pete -- http://www.elbnet.com ELB Internet Services, Inc. Web Design, Computer Consulting, Internet Hosting - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php