Re: logrotate problem with mysql
On Fri, 10 Jan 2003, Michael T. Babcock wrote: if test -n `ps acx|grep mysqld`; then /usr/bin/mysqladmin flush-logs fi You're probably running it as root with the password loading from the /root/.my.cnf or something. Try adding the -uroot -p command-line options, or a [mysqladmin] section to your ~root/.my.cnf file. My /root/.my.cnf has 600 permissions and looks like: [mysqladmin] password=rootpassword user=root Do I need to add this section to the /etc/my.cnf? Is the user unknown to mysqladmin when it's run through logrotate? Thanks again. -- Jiann-Ming Su [EMAIL PROTECTED] 404-712-2603 Development Team Systems Administrator General Libraries Systems Division - 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
logrotate problem with mysql
I'm using mysql that was distributed by mysql.com. I seem to be having a problem with logrotate. When I run logrotate manually on mysql only, the logs seem to rotate fine. But, when it runs in the cron job, it creates the new log, but mysql continues to log to the old log. My mysql logrotate entry looks like: /var/log/mysqld.log { create 644 mysql mysql notifempty daily rotate 2 missingok nocompress postrotate # just if mysqld is really running if test -n `ps acx|grep mysqld`; then /usr/bin/mysqladmin flush-logs fi endscript } I have also tried using mysqladmin refresh. Any ideas why the logs aren't being rotated properly under cron? -- Jiann-Ming Su [EMAIL PROTECTED] 404-712-2603 Development Team Systems Administrator General Libraries Systems Division -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list - 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: logrotate problem with mysql
Jiann-Ming Su wrote: if test -n `ps acx|grep mysqld`; then /usr/bin/mysqladmin flush-logs fi You're probably running it as root with the password loading from the /root/.my.cnf or something. Try adding the -uroot -p command-line options, or a [mysqladmin] section to your ~root/.my.cnf file. -- Michael T. Babcock C.T.O., FibreSpeed Ltd. http://www.fibrespeed.net/~mbabcock - 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