RE: [PHP] Re: MySQL back up

From: Date: Thu, 10 Oct 2002 12:30:23 +0000
Subject: RE: [PHP] Re: MySQL back up
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-119520@lists.php.net to get a copy of this message
Ken .. You have to replace exec("mysqldump -u\"$sqlusername\" -p\"$sqlpassword\" \"$sqldatabase\" > $backupdir/$nam.sql"); With this exec("mysqldump -u \"$sqlusername\" --password=\"$sqlpassword\" \"$sqldatabase\" > $backupdir/$nam.sql"); Please not the space after -u And i agree owen about 2. $backupdir MUST BE writeable by apache IT HAS TO WORK MAN !! Cordialmente Daniel Massón => Ingeniero de desarollo dmasson@imagine.com.co www.imagine.com.co Tels: (57)(1) 2182064 - 6163218 Bogotá - Colombia ------------------------------------------------------------------------ - Soluciones web para internet e intranet - Asesoría y Soporte Técnico - Licenciamiento de Software -----Mensaje original----- De: Ken [mailto:admin@kabwebs.com] Enviado el: miércoles, 09 de octubre de 2002 22:36 Para: php-general@lists.php.net Asunto: Re: [PHP] Re: MySQL back up Okay here is the new code and this is still not working. <?php require("./config.php"); $sqlserver = $server1; $sqlusername = $username1; $sqlpassword = $password1; $sqldatabase = $database1; //****************************** $nam_bak=date('D,d-m-Y'); exec("mysqldump -u\"$sqlusername\" -p\"$sqlpassword\" \"$sqldatabase\" > $backupdir/$nam.sql"); exec("gzip $backupdir/$nam.sql"); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#119520) next »