I have a MySQL dump file that I want to read into a PHP script and issue to MySQL to build the DB's tables and insert all the data. I know I can do this through PHPMyAdmin, but this will need to be a pre-configured script (i.e. it knows which DB it's working with and know where to find the dump file) that I'll need to run nightly as well as throughout the day dependent on user activity.
Does anyone know a script that can do this? It seems complicated enough to parse the text file into distinct SQL statements to issue to the database that I'd rather someone else have done it before me. Does anyone know if it's possible to make use of PHPMyAdmin's functionality this way?