Thanks for the examples. I haven't been able to get them to work yet.

Here's what I tried:

MYSQL="`which mysql 2>/dev/null`" || MYSQL="/usr/local/bin/mysql"
MYSQL_ARGS="--opt -uroot -pmypassword db"
ARCHDIR=/backup/mysql
NAME=db_dump

# Remove archives older than 64 days
find ${ARCHDIR} -type f -mtime +64 | xargs rm -f

# Create new archives
cd ${ARCHDIR} && mysqldump ${MYSQL} ${MYSQL_ARGS} > ${NAME}.`date +%Y%m%d`

I only get:
mysqldump: Got error: 1045: Access denied for user: '[EMAIL PROTECTED]' (Using
password: NO) when trying to connect

While I can login to mysql easily with this user/pass from the command
prompt. I have also tried the specific user for this database. Same problem.

Any ideas?

Thanks,
Andreas

Reply via email to