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

Total Post:411

Points:2881
Posted on    March-10-2012 2:28 AM

 MYSQL MYSQL 
Ratings:


 1 Reply(s)
 1739  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

Points:476
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";

Where,
$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