mysql -h192.168.1.10 -utest -ptest --batch --default-character-set=utf8 "--execute=SELECT * FROM Account.Country;" > output.txt
输出查询结果为纵向显示:
mysql -h192.168.1.10 -utest -ptest --vertical --default-character-set=utf8 "--execute=SELECT * FROM Account.Country;" > output.txt
输出查询结果为html:
mysql -h192.168.1.10 -utest -ptest --html --default-character-set=utf8 "--execute=SELECT * FROM Account.Country;" > output.html
输出查询结果为xml:
mysql -h192.168.1.10 -utest -ptest --xml --default-character-set=utf8 "--execute=SELECT * FROM Account.Country;" > output.html