HOW TO CREATE MYSQL DATABASE BACKUP FILE USING PHP?

Pravesh Singh

Total Post:412

Points:2888
Posted by  Pravesh Singh
MYSQL 
 2090  View(s)
Ratings:
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.
  1. Arun Singh

    Post:68

    Points:476
    Re: How to create mysql database backup file using PHP?

    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.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!