I was wondering how to delete the values in a MySQL database table from bash.
I have a database called "database" and a table in that database called "table".
Now I want to dump and clear the database from a bash script.
How can I delete the values?
I am using:
mysqldump database > $DB_BACKUP/01/table-`date +%Y-%m-%d` (to dump)
and now trying to
DELETE FROM database.table WHERE filed < CURDATE()-5