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

  )

原文地址:https://www.cnblogs.com/mydomain/p/2726965.html