I need a variable to hold results retrieved from the database. So far this is basically what I\'m trying with no success.
myvariable=$(mysql database -u $use
If you want to use a single value in bash use:
companyid=$(mysql --user=$Username --password=$Password --database=$Database -s --execute="select CompanyID from mytable limit 1;"|cut -f1) echo "$companyid"