You could use the exec command to dump data into a database as you would via the mysql command line.
eg, from the command prompt -
c:\web\mysql\bin>mysql -u root -ppw mydb<D:\dump\mydump.sql
can be executed in php -
exec("C:\\web\\mysql\\bin\\mysql -u root -ppw mydb<D:\\dump\\mydump.sql");
Just change the path to mysql install and where the dump file is.