Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backing up a database

Status
Not open for further replies.

PhoenixDown

Programmer
Jul 2, 2001
279
CA
How do I backup my database and show the sql file on the web browser?
 
If you are using MySQL, this should work:
echo exec("mysqldump -uUSERNAME -pPASSWORD DATABASE");
There is probably some other way to do it, but that should do what you want. //Daniel
 
Try executing your command from a console. If it does work there, make sure that the webserver user has the rights execute the mysqldump program. //Daniel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top