--- code line where issue came
mysql -u root -p --execute="UPDATE mysql.tSub_SubJob SET Error_Description = '$errorMarkDown' WHERE sub_job_name='$line'"
--- Data Type $errorMarkDown LongText
-- value of $errorMarkDown which is insert into table
2019/10/22 05:07:17 - Stored_orders - ERROR (version 7.0.0.0-25, build 1 from 2016-11-05 15.35.36 by buildguy) : (stderr) rm: cannot remove '/usr/local/Data_Files/hiveworx_shell_files/AWS_Stored_orders.csv.gz': No such file or directory
-- Error
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '': No such file or directory' WHERE sub_job_name='AWS_Shelves_Details'' at line 1
$errorMarkDownvariable. Probably you have to escape the content of$errorMarkDown. Btw. It's always a bad idea to use string pasting with SQLA. Or event better, you could use bind parameters How to bind parameters in mysql query?