Home > DeveloperSection > Forums > How to create mysql database backup file using PHP?
Pravesh Singh

Total Post:412

Posted on    March-10-2012 2:28 AM


 1 Reply(s)
 2022  View(s)
Rate this:
Hello Guys,
I'm troubling with one problem, actually I want to create a backup of MYSQL database. So, could you tell me how to perform this task.

Please resolve my problem as soon as possible.

Arun Singh

Total Post:68

Posted on    March-12-2012 1:03 AM

Hello Pravesh Singh,
It is not big issue, to resolve this problem you can use following query...
Query:  "SELECT * INTO OUTFILE '$backupFile' FROM $tableName";

$backupFile -> is backup file name with path.
$tableName -> is that table for which you create backup.

I hope it might be helpful for you.

Don't want to miss updates? Please click the below button!

Follow MindStick