how to run mysql query in bash script 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