mysql command line execute sql code example
Example 1: mysql execute command from command line
mysql -u <user> -p -e "select * from schema.table"
Example 2: running external script mysql command
Copied mysql> source file_name
mysql> \. file_name