Answers for "how to run sql command in bash script"

SQL
2

run mysql command from bash

mysql --user="$user" --password="$password" --database="$database" --execute="DROP DATABASE $user; CREATE DATABASE $database;"
Posted by: Guest on January-20-2021
0

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
Posted by: Guest on March-22-2021

Code answers related to "how to run sql command in bash script"

Code answers related to "SQL"

Browse Popular Code Answers by Language