Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import mysql dump using php

Tags:

php

mysql

I have mysql dump file. How I can import this file into mysql using php?

like image 721
user515503 Avatar asked Feb 25 '23 16:02

user515503


1 Answers

Depends on how big the dump file is, really. A small one can just be added with a sql command. A larger one can be imported with a script.

A quick search will reveal many pre-made scripts that break down a dump into smaller chunks in order to not overload the server. I have used this one in the past: http://www.ozerov.de/bigdump.php

like image 138
Kavi Siegel Avatar answered Mar 08 '23 03:03

Kavi Siegel