1,新建一个文件,如在C:/下 ,将想要执行的命令输入文件中,如: use mysql; select host, user from user ; 2,调用刚才的命令: 在命令行中输入: /. C:p.txt或source C:p.txt