Problem: after writing a mysqldump backup script and executing it directly, the backup file can be generated normally, but the backup file generated when running a scheduled task is empty
Analysis reason: since mysqldump exists under the bin of the global environment variable mysql, the mysqldump command can be recognized when running directly, but the mysqldump command cannot be recognized in the scheduled task. (PS: crontab running failure is basically caused by environment variables)
Solution: just add the absolute path before the mysqldump command
Similar Posts:
- How to Backup MySQL database regularly
- Linux cron has no effect after executing the script, and the log reports an error orphan (no passwd entry)
- [Solved] Backup mysql8.0 with the mysqldump of mysql5.7 Error
- How to Sovle mysqldump backup Error on the MySQL command line
- Solving the problem of “authentication token is no longer” in crontab
- At 00:00 every day, MySQL regularly pops up a taskeng.exe
- mysqldump unknown table ‘column_statistics’
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- [Warning] Using a password on the command line interface can be insecure. (Solved)
- MySQL Use innobackupex to backup and recovery error [How to Solve]