Im making a script where I connect to a database, look for a value and then if that value returned something then I will do something else.
ip=$("variable is defined here")
Then I connect to the MYSQL database using:
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot --password=*
However, this takes me to another prompt, and I need to run another command from that, I can't get it to work.
I tried this:
/Applications/MAMP/Library/bin/mysql "MYSQL argumens;";
and just:
MYSQL arguments;
None of these work and I have to pass a variable to it, what can I do now?