Re: Re: MySQL back up

From: Date: Fri, 18 Oct 2002 01:43:20 +0000
Subject: Re: Re: MySQL back up
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-120452@lists.php.net to get a copy of this message
Thanks Everyone for all the suggestions and help. I am not sure what the issue is, but nothing works with PHP that is. I am using a script written by someone else in Perl that seems to work just fine. I have no clue why I can't get it to work in PHP though? Ken "Daniel Masson" <dmasson@imagine.com.co> wrote in message news:2081DA1102CFD6118ED20050DAD5D34506357A@intranet.imaginet.imagine.com.co ... 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 (#120452) next »