I want to execute a .sql file in a bash file but I need to pass parameters to the .sql from the bash file. I think it's a simple solution but I can't figure it out.
This is what I have so far:
.SQL File
SET @columnValue = &1;
UPDATE tblTest SET Description = @columnValue;
Bash File
#!/bin/bash
columnValue=$1
mysql -uroot -ppassword testDB < SQLscript.sql $columnValue
Shell
sh myBashFile.sh "testColumnValue"
Can anyone tell me what i am doing wrong?