faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

12 of 14 people (86%) answered Yes
Recently 3 of 5 people (60%) answered Yes

Entry

How can I backup database via PHP3 ??

Sep 29th, 2000 08:41
Narendra Jain, Jakub Marecek,


You have to use the mysqldump command as below:
$db = mysql_connect("localhost","root");
$mysql_select_db("mydb",$db);
if ($result = mysql_query("mysqldump -a $db ") )
  {
  echo "Backup complete \n"
  }
else
  {
  echo "Backup failure \n"
  };