Link to home
Start Free TrialLog in
Avatar of ravenpl
ravenplFlag for Poland

asked on

mysqldump: Option '--set-variable' is deprecated. Use --variable-name=value instead.

Recently I started getting the cron mails with the following message

Warning: mysqldump: Option '--set-variable' is deprecated. Use --variable-name=value instead.

The command causing the message is
# export MYSQL_PWD="PasswordHere"
# mysqldump -AaFf --opt -hlocalhost -uroot | gzip > $DST/sql.my.gz
I tried without the MYSQL_PWD variable and -p option instead - same result.

Anybody knows how to avoid the warning. But please don't suggest redirecting stderr to /dev/null - I want to get real errors by email.

Fedora11 here with mysql-5.1.45-2.fc11
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Try using this instead.
The -a is probably using --set-variable internally

# mysqldump -AFf --create-options --opt -hlocalhost -uroot | gzip > $DST/sql.my.gz
ASKER CERTIFIED SOLUTION
Avatar of cyberkiwi
cyberkiwi
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ravenpl

ASKER

Bingo, the my.cnf contained set-variable clause!