Import .sql file into multiple databases
If you're running on Linux/Unix, you can do it with a bit of shell:

for DB in `mysql -u root -r --silent -p -e 'show databases;' | egrep -v "_schema$|^mysql$|^sys$"`
do 
  mysql -uroot -p $DB &lt; test.sql
done


Will obviously be easier if you temporarily set it up to be passwordless.