•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 392,083 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,943 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1361 | Replies: 8
![]() |
Hi
Does anyone know what is the simplest way to backup a database using the mysqldump function in php?
I have googled a lot and the codes i have found are very hard to understand and most of them does not work.
Thanx in advance for your help.
Does anyone know what is the simplest way to backup a database using the mysqldump function in php?
I have googled a lot and the codes i have found are very hard to understand and most of them does not work.
Thanx in advance for your help.
•
•
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation:
Rep Power: 5
Solved Threads: 34
If you are allowed to use exec() then that will make it a one line script. Otherwise you can't access mysqldump directly through PHP.
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Jul 2007
Location: Sofia, Bulgaria
Posts: 138
Reputation:
Rep Power: 2
Solved Threads: 10
•
•
Join Date: May 2006
Location: New Jersey
Posts: 1,422
Reputation:
Rep Power: 5
Solved Threads: 34
John Conde
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
Brainyminds | Merchant Account Services | I Love Code
IT'S HERE: Merchant Accounts 101 Everything you need to know about merchant accounts!
•
•
Join Date: Jul 2007
Location: Sofia, Bulgaria
Posts: 138
Reputation:
Rep Power: 2
Solved Threads: 10
Backup :
Restore :
- Mitko Kostov
php Syntax (Toggle Plain Text)
$command = "mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]";
Restore :
php Syntax (Toggle Plain Text)
$command = "mysqldump -u [username] -p [password] [databasename] < [backupfile.sql]";
php Syntax (Toggle Plain Text)
system($commmand);
- Mitko Kostov
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- mysqldump from asp (ASP)
- need help w/ CRON job for backups (*nix Software)
- Backing up a MySQL database (MySQL)
- MySQL for this forum ... (MySQL)
Other Threads in the PHP Forum
- Previous Thread: Retrieve URL from address bar
- Next Thread: image verification



Linear Mode