Loading a MySQL Dump File via PHP NOT the mysql command line
Date: 11/18/05
(PHP Community) Keywords: php, mysql, sql
I've searched and searched and haven't found anything, so any help or direction would be greatly appreciated.
I have mysql dump files, that are very large, some close to 100 megs (ok large in my opinion), the contain the MySQL statements to dump the table if exists, create, then load the data. I had a daily routine where I would use the mysql command line to load them, but a server issue happened that caused the mysql command to not load due to a segment error (libs were upgraded that shouldn't have been - long story) however the mysql "service" works, and PHP connects to it just fine. What I would like to do is use a PHP script to load these dump files. I tried some script examples on php.net, but they failed, and I wanted to know if anyone else had done this successfuly? And how?
Thanks!
Source: http://www.livejournal.com/community/php/369639.html