#/bin/sh
MYSQL="mysql -h192.168.18.140 -uroot -p123456 --default-character-set=utf8"
sql="select * from stu.stu"
result="$($MYSQL -e "$sql")"
echo -e "$result"
mysql进阶--shell操作mysql
最新推荐文章于 2024-08-09 12:16:27 发布
#/bin/sh
MYSQL="mysql -h192.168.18.140 -uroot -p123456 --default-character-set=utf8"
sql="select * from stu.stu"
result="$($MYSQL -e "$sql")"
echo -e "$result"