Mysql执行sql脚本的方法: 一: [root@test1 ~]# mysql -S /tmp/mysql_3307.sock -pmysql hello <all.sql 二: mysql> source /root/all.sql