How Connect to a Database in Shell Programming?
Answer Posted / supraja
mysql -uusername -ppassword -hipaddress database -e "statement"
eg:mysql -uroot -psuppu -h192.168.0.1 supraja -e "select
count(*) from table"
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is shell variable?
Is shell a scripting language?
What is inside a seashell?
How do I read a .sh file?
What is a command line shell?
Suppose you execute a command using exec, what will be the status of your current process in the shell?
I want to connect to a remote server and execute some commands, how can I achieve this?
What is the equivalent of a file shortcut that we have a window on a linux system?
How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }
Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.
What are script files?
Calculate a real number calculation directly from the terminal and not any shell script.
What are scripts in psychology?
How to check if the previous command was run successfully?
What is the conditional statement in shell scripting?