How Connect to a Database in Shell Programming?
Answer Posted / sibin kc
You can simply use as follows.
mysql -h <hostname> -u <user name> -p<password> -e "use
psa;select * from domains where domain_name = 'hai.com';"
| Is This Answer Correct ? | 9 Yes | 6 No |
Post New Answer View All Answers
Calculate a real number calculation directly from the terminal and not any shell script.
What are the different variables present in linux shell?
How can you find out how long the system has been running?
Why is it called a shell?
How will you find the 99th line of a file using only tail and head command?
Print a given number, in reverse order using a shell script such that the input is provided using command line argument only.
What are the different communication commands available in the shell?
What is bash coding?
What is a batch file used for?
How to pass an argument to a script?
What is the use of a shebang line?
Is cmd a shell?
Explain about stdin, stdout and stderr?
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
Can we run shell script in windows?