shell访问mysql

ret_value=$(

  /usr/bin/mysql -uroot -h $db_ip <<QUERY_STRING

  use my_database;select * from my_table where name = 'china';

  QUERY_STRING

  )

posted @ 2012-10-16 23:28  浪里飞  阅读(295)  评论(0编辑  收藏  举报