1、mysql 数据库表信息

shell脚本中执行sql命令

2、shell脚本(a.sh)信息

#!/bin/sh
mysql -u root << myInsert
    insert into test.t values("LXH",100);
myInsert

3、执行

     ./a.sh

4、 执行结果

shell脚本中执行sql命令

相关文章: