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 have particular database name and a host on which you want the query to be executed then follow below query:
outputofquery=$(mysql -u"$dbusername" -p"$dbpassword" -h"$dbhostname" -e "SELECT A, B, C FROM table_a;" $dbname)
So to run the mysql queries you need to install mysql client on linux