Given:
Directory tree that contains files with .sql
extension.
Requred
Find them all recursively and pass found files one by one to mysql
client as:
mysql < ./dir/subdir/subsubdir/schema.sql
My feeble attempt
find . -name '*.sql' | xargs mysql
Results in:
ERROR 1049 (42000): Unknown database './dir/subdir/subsubdir/schema.sql'
Question
How to do it right?
Thanks!