I have a mysql database on a shared web host. It's grown too large, and a single dump process with zipping is getting killed. I want to dump and zip each table in individually. With this command
mysqldump -uuser -ppass database < show_tables.sql
I can get it to return all the names of the tables like so:
table1 table2 etc ...
How can I feed this into a bash script so that I can feed each line into a command of this syntax
mysqldump -uuser -ppass database table_name_goes_here > and_here.sql
Edit Sorry folks, I made a mistake in the original formatting. The output from the
show tables query is not a single line with space-delimited table names; it is actually one table name per line, as it is formatted now. I apologize for the confusion.