可以使用 [root@ ~]# mysql -uroot -ppassword (-t) < filename filename中写入需要批处理的语句,得到查询结果 (产生类似sql查询结果展示) 也可以在mysql 下 mysql -> source filename