1、
!/bin/bash
MYSQL=MYSQL mytest -u test -e 'select * from employees'
2、
!/bin/bash
MYSQL=MYSQL mytest -u test <<EOF
show tables;
select * from employees where salary<40000;
EOF
3、
image.png
4、
image.png
1、
MYSQL=MYSQL mytest -u test -e 'select * from employees'
2、
MYSQL=MYSQL mytest -u test <<EOF
show tables;
select * from employees where salary<40000;
EOF
3、
4、
本文标题:shell操作mysql脚本
本文链接:https://www.haomeiwen.com/subject/rvyduqtx.html
网友评论