How can I execute an SQL command through a shell script so that I can make it automated?
I want to restore data I have collected in a SQL file using a shell script.
Use
echo "your sql script;" | mysql -u -p -h db_name