脚本
SET dbhost=127.0.0.1
SET dbuser=root
SET dbpasswd=xxxx
SET dbName=dbnamexx
SET sqlpath=./
set sqlfile=statistics_fee_data_sync.sql
mysql -h%dbhost% -u%dbuser% -p%dbpasswd% --database=%dbName% < %sqlpath%%sqlfile% --default-character-set=utf8
@ECHO Done!
=========================================================================================
语句
SET dbhost=127.0.0.1
SET dbuser=root
SET dbpasswd=xxxx
SET dbName=dbnamexx
SET sqlpath=./
set sqlfile=statistics_fee_data_sync.sql
mysql -h%dbhost% -u%dbuser% -p%dbpasswd% %dbName% -e "select * from cityinfo2;select * from correct2 limit 100;"