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
how will you find the total disk space used by a specific user?
What is path in shell script?
Write a command sequence to find the count of each word?
How do I set bash as default shell mac?
What is awk in shell script?
How do you debug a script?
How to calculate the number of passed arguments?
Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.
What is echo in shell?
What are the zombie processes?
What does .sh file contain?
What is console line?
What is a program shell?
How to debug the problems encountered in the shell script/program?
What's the difference between scripting and coding?