mysql查詢txt,將mysql控制臺執(zhí)行命令的結(jié)果輸出?
代碼示例:
#!/bin/bash
Host=localhost
User=root
Password=root
mysql -h $Host -u$User -p$Password << EOF
use Library;
select email from User where Id = "123456" into outfile '/tmp/fd.txt';
EOF
代碼示例:
#!/bin/bash
Host=localhost
User=root
Password=root
mysql -h $Host -u$User -p$Password << EOF
use Library;
select email from User where Id = "123456" into outfile '/tmp/fd.txt';
EOF