批处理管道符MySQL输入密码

在使用MySQL的批处理命令时,可能会遇到需要输入密码的情况。而通过管道符可以实现在命令行中输入密码。

mysql -u username -p | [password]