This is the simple method to run a mysql query from Bash script
###### mvc is name of database and --host is the database host
Query3="select * from ta_lookup where gds = 'wsp' and server like 'reported%';"
echo "$Query3" | mysql --host=tiber12 mvc
###### mvc is name of database and --host is the database host
No comments:
Post a Comment