source mysql command code example
Example 1: execute mysql file
mysql -u yourusername -p yourpassword yourdatabase < text_file
Example 2: mysql load sql from file
mysql> use db_name;
mysql> source file_name.sql;
mysql -u yourusername -p yourpassword yourdatabase < text_file
mysql> use db_name;
mysql> source file_name.sql;