1
可能重复:
How to execute Mysql command from a shell script?bash脚本不能读取输入mysql的密码
我试图执行使用bash脚本一个.sql
文件。但我在连接到MySQL时遇到问题。这是我到目前为止:
#! /bin/sh
PWD="thepassword"
mysql -p -u theuser < Randomsqlfile.sql
echo $PWD
当提示密码时,什么也没有填满。
这并感谢! – Anthony