My system requirement is to execute sequence of mysql commands from ubuntu terminal,
For testing I create a file query.sql on the desktop that have a content like:
create table aa (id int);
create tab bb (id int);
create table cc (id int);
I execute this with command like:
zero@zero-desktop:~/Desktop$ mysql --user=root --password=admin --database=zero <query.sql
My problem is if any query fail, script stop executing.
Can anybody tell me how I prevent it[ here only second have wrong syntax, first and third should be run]
I want to execute whole script, if any fail avoid it and start again from next query and generate a file where it shows error list........