你在提示符下输入?看一看有什么东西!!其中有一栏是说明如何执行script的我已经把它标记出来。mysql>?help    (\h)    Display this help.
?       (\?)    Synonym for `help'.
clear   (\c)    Clear command.
connect (\r)    Reconnect to the server. Optional arguments are db and host.
ego     (\G)    Send command to mysql server, display result vertically.
exit    (\q)    Exit mysql. Same as quit.
go      (\g)    Send command to mysql server.
notee   (\t)    Don't write into outfile.
print   (\p)    Print current command.
prompt  (\R)    Change your mysql prompt.
quit    (\q)    Quit mysql.
rehash  (\#)    Rebuild completion hash.
=============================================================================
source  (\.)    Execute a SQL script file. Takes a file name as an argument.
=============================================================================
status  (\s)    Get status information from the server.
tee     (\T)    Set outfile [to_outfile]. Append everything into given outfile.
use     (\u)    Use another database. Takes database name as argument.
mysql> \. 路径/文件名字
在文件名不一定是以.sql结尾的。