shell脚本中执行sql命令
1、mysql 数据库表信息

2、shell脚本(a.sh)信息
#!/bin/sh mysql -u root << myInsert insert into test.t values("LXH",100); myInsert
3、执行
./a.sh
4、 执行结果

1、mysql 数据库表信息

2、shell脚本(a.sh)信息
#!/bin/sh mysql -u root << myInsert insert into test.t values("LXH",100); myInsert
3、执行
./a.sh
4、 执行结果
