Run multiple sql files in mysql batch

batch-file, mysql

Solution

Assuming you're using bash:

`cat *.sql | mysql`

Problem

to run a single file you can run in mysql .\ filename or you outside of mysql you can run mysql < filename I have a directory of sql files so I'm trying to run them all at once by using a wildcard *.sql but it doesn't work. Any ideas?

Original source