run sql script in mysql shell code example
Example 1: run mysql command from bash
mysql --user="$user" --password="$password" --database="$database" --execute="DROP DATABASE $user; CREATE DATABASE $database;"
Example 2: mysql bash execute sql file
mysql -u user -p data_base_name < sql_file.sql
# execute sql file in target database or juste in mysql