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


Please Help Members By Posting Answers For Below Questions

How will you connect to a database server from linux?

557


Is powershell a bash?

590


What is shell application?

568


how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com

2105


How to print all the arguments provided to the script?

557






Where are cowrie shells found?

578


c program the catches the ctrl-c(SIGINT) Signal for the first time and prints a output rather and exit on pressing Ctrl-C again

5227


c program to display the information of given file similar to givan by the unix or linux command ls -l

1697


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

1791


c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l

3156


How do I run a .sh file?

615


What are filters explain sort with all the options available?

932


c program which behaves like a shell(command interpreter). it has its own prompt say "NewShell$".any normal shell command is executed from your shell by starting a child process to execute a system program corrosponding to the command

4692


Explain how you Automate your application using Shell scripting.

1847


Suppose you execute a command using exec, what will be the status of your current process in the shell?

580