I am wanting to write and execute a single mysql .sql file that will execute multiple other .sql files. I am looking for something equivalent to Oracle's:
@script1.sql
@script2.sql
@script3.sql
Does MYSQL have a command?
From bash or any shell, you can run as follows
cat script*.sql | mysql -u root -pYOURPASSWORD dbname
This would execute all for your sql files for 'dbname'
Cheers!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With