Re: [PHP] mysqldump

2010-08-24 Thread Jan G.B.
2010/8/18 Daniel P. Brown daniel.br...@parasane.net: On Tue, Aug 17, 2010 at 15:19, tedd t...@sperling.com wrote: Bingo -- that worked. It's interesting that a space is optional between -u and user, but required to be absent between -p and password. Seems not symmetrical to me.    The

Re: [PHP] mysqldump

2010-08-18 Thread Daniel P. Brown
On Tue, Aug 17, 2010 at 15:19, tedd t...@sperling.com wrote: Bingo -- that worked. It's interesting that a space is optional between -u and user, but required to be absent between -p and password. Seems not symmetrical to me. The command I sent was because - as I said in the original

[PHP] mysqldump

2010-08-17 Thread tedd
Hi gang: At 6:11 PM -0400 8/13/10, Daniel P. Brown wrote: Easiest method, from the command line on the server from which you want to dump the database: mysqldump -u user -p database_name outfile.sql That might be the easiest, but all I get is an empty file. I've tried many

Re: [PHP] mysqldump

2010-08-17 Thread Robert Cummings
On 10-08-17 02:08 PM, tedd wrote: Hi gang: At 6:11 PM -0400 8/13/10, Daniel P. Brown wrote: Easiest method, from the command line on the server from which you want to dump the database: mysqldump -u user -p database_name outfile.sql Command is wrong... should be:

Re: [PHP] mysqldump

2010-08-17 Thread tedd
At 2:17 PM -0400 8/17/10, Robert Cummings wrote: On 10-08-17 02:08 PM, tedd wrote: Hi gang: At 6:11 PM -0400 8/13/10, Daniel P. Brown wrote: Easiest method, from the command line on the server from which you want to dump the database: mysqldump -u user -p database_name

Re: [PHP] mysqldump

2010-08-17 Thread Mari Masuda
On Aug 17, 2010, at 11:40 AM, tedd wrote: At 2:17 PM -0400 8/17/10, Robert Cummings wrote: On 10-08-17 02:08 PM, tedd wrote: Hi gang: At 6:11 PM -0400 8/13/10, Daniel P. Brown wrote: Easiest method, from the command line on the server from which you want to dump the database:

Re: [PHP] mysqldump

2010-08-17 Thread Robert Cummings
On 10-08-17 02:45 PM, Mari Masuda wrote: On Aug 17, 2010, at 11:40 AM, tedd wrote: At 2:17 PM -0400 8/17/10, Robert Cummings wrote: On 10-08-17 02:08 PM, tedd wrote: Hi gang: At 6:11 PM -0400 8/13/10, Daniel P. Brown wrote: Easiest method, from the command line on the server from

Re: [PHP] mysqldump

2010-08-17 Thread David Hutto
On Tue, Aug 17, 2010 at 2:55 PM, Robert Cummings rob...@interjinn.com wrote: On 10-08-17 02:45 PM, Mari Masuda wrote: On Aug 17, 2010, at 11:40 AM, tedd wrote: At 2:17 PM -0400 8/17/10, Robert Cummings wrote: On 10-08-17 02:08 PM, tedd wrote: Hi gang: At 6:11 PM -0400 8/13/10, Daniel P.

Re: [PHP] mysqldump

2010-08-17 Thread David Hutto
On Tue, Aug 17, 2010 at 3:00 PM, David Hutto smokefl...@gmail.com wrote: On Tue, Aug 17, 2010 at 2:55 PM, Robert Cummings rob...@interjinn.com wrote: On 10-08-17 02:45 PM, Mari Masuda wrote: On Aug 17, 2010, at 11:40 AM, tedd wrote: At 2:17 PM -0400 8/17/10, Robert Cummings wrote: On

Re: [PHP] mysqldump

2010-08-17 Thread Robert Cummings
On 10-08-17 03:00 PM, David Hutto wrote: On Tue, Aug 17, 2010 at 2:55 PM, Robert Cummingsrob...@interjinn.com wrote: On 10-08-17 02:45 PM, Mari Masuda wrote: On Aug 17, 2010, at 11:40 AM, tedd wrote: At 2:17 PM -0400 8/17/10, Robert Cummings wrote: On 10-08-17 02:08 PM, tedd wrote: Hi

Re: [PHP] mysqldump

2010-08-17 Thread David Hutto
On Tue, Aug 17, 2010 at 3:04 PM, Robert Cummings rob...@interjinn.com wrote: On 10-08-17 03:00 PM, David Hutto wrote: On Tue, Aug 17, 2010 at 2:55 PM, Robert Cummingsrob...@interjinn.com  wrote: On 10-08-17 02:45 PM, Mari Masuda wrote: On Aug 17, 2010, at 11:40 AM, tedd wrote: At 2:17 PM

Re: [PHP] mysqldump

2010-08-17 Thread tedd
At 11:45 AM -0700 8/17/10, Mari Masuda wrote: Actually, mysqldump -u user -p password database_name outfile.sql is also the incorrect command. When providing the password in the command, there should not be a space between the -p and the actual password. Try mysqldump -u

Re: [PHP] mysqldump

2010-08-17 Thread Jason Pruim
On Aug 17, 2010, at 3:19 PM, tedd t...@sperling.com wrote: At 11:45 AM -0700 8/17/10, Mari Masuda wrote: Actually, mysqldump -u user -p password database_name outfile.sql is also the incorrect command. When providing the password in the command, there should not be a space

Re: [PHP] mysqldump problem from PHP

2006-10-24 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-23 16:34:16 +0100: It appears that it could be because the user that runs the scripts is not allowed to. When I run them on the commandline, I run them as the root user. that's very simple to check (man su) yes I know of CRONtabs but wont this still

Re: [PHP] mysqldump problem from PHP

2006-10-24 Thread Chris
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-10-23 16:34:16 +0100: It appears that it could be because the user that runs the scripts is not allowed to. When I run them on the commandline, I run them as the root user. that's very simple to check (man su) yes I know of CRONtabs but

Re: [PHP] mysqldump problem from PHP

2006-10-24 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-24 17:58:45 +1000: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-10-23 16:34:16 +0100: It looks to me as if you are trying to use web scripting (PHP) to do the sysadmin on your server, for which other methods are more suitable. Those would be? What

[PHP] mysqldump problem from PHP

2006-10-23 Thread Angelo Zanetti
hi all, Im doing the following dump through PHP: $output = shell_exec('mysqldump '. $db_database .' '. $backup_path.$filename); It doesnt seem to work but when I run the exact same command (with appropriate values) in the command line it creates the dump file. What could be the reason for

Re: [PHP] mysqldump problem from PHP

2006-10-23 Thread clive
write rights for apache/php user to the $backup_path? also is apache/php user allowed to run mysqldump? hi all, Im doing the following dump through PHP: $output = shell_exec('mysqldump '. $db_database .' '. $backup_path.$filename); It doesnt seem to work but when I run the exact same

Re: [PHP] mysqldump problem from PHP

2006-10-23 Thread Angelo Zanetti
Angelo Zanetti wrote: hi all, Im doing the following dump through PHP: $output = shell_exec('mysqldump '. $db_database .' '. $backup_path.$filename); It doesnt seem to work but when I run the exact same command (with appropriate values) in the command line it creates the dump file.

RE: [PHP] mysqldump problem from PHP

2006-10-23 Thread Edward Kay
hi all, Im doing the following dump through PHP: $output = shell_exec('mysqldump '. $db_database .' '. $backup_path.$filename); It doesnt seem to work but when I run the exact same command (with appropriate values) in the command line it creates the dump file. What could be the

Re: [PHP] mysqldump problem from PHP

2006-10-23 Thread Brad Bonkoski
Edward Kay wrote: hi all, Im doing the following dump through PHP: $output = shell_exec('mysqldump '. $db_database .' '. $backup_path.$filename); It doesnt seem to work but when I run the exact same command (with appropriate values) in the command line it creates the dump file. What could be

Re: [PHP] mysqldump problem from PHP

2006-10-23 Thread Angelo Zanetti
Edward Kay wrote: Angelo Zanetti wrote: hi all, Im doing the following dump through PHP: $output = shell_exec('mysqldump '. $db_database .' '. $backup_path.$filename); It doesnt seem to work but when I run the exact same command (with appropriate values) in the command line it

Re: [PHP] mysqldump problem from PHP

2006-10-23 Thread David Giragosian
Angelo, as Brad says, you can pass user and password args to mysqldump from an include file. I run a php backup script via cron every night, then tar and compress and store in various dirs out of the web tree. I have the script if you'd like. It came from someone on the php-db list years ago,

[PHP] MySQLDump and master/slave Behavior

2006-10-03 Thread David Giragosian
Howdy Guys, I have a PHP backup script running as a cronjob that has an exec(mysqldump) line followed a bit later by an exec(tar -cjf) line. The backup script runs against a slave db in the wee hours, and the master gets a continuous stream of inputs at the rate of about 18,720 per day.

Re: [PHP] MySQLDump and master/slave Behavior

2006-10-03 Thread Jon Anderson
David Giragosian wrote: So, Question 1 is: does mysqldump's connection to the slave db exist for the entire script execution time, or just for the length of time of its own execution? I imagine if I used mysql_connect() in the script that it would be for the entire length of the script

Re: [PHP] MySQLDump and master/slave Behavior

2006-10-03 Thread Joe Wollard
1. mysqldump will only keep the connection open for as long as it needs it. Once your calling script is allowed to continue mysqldump has either exited successfully or with an error, but either way the connection should no longer be active. 2. I don't think that would be a good idea. 30

Re: [PHP] MySQLDump and master/slave Behavior

2006-10-03 Thread Richard Lynch
On Tue, October 3, 2006 9:29 am, David Giragosian wrote: So, Question 1 is: does mysqldump's connection to the slave db exist for the entire script execution time, or just for the length of time of its own execution? exec() runs its own little mini-not-quite-shell, so as soon as it ends, the

Re: [PHP] MySQLDump and master/slave Behavior

2006-10-03 Thread David Giragosian
Thank you Jon, Joe, and Richard. I guess I'll leave things as they are and continue to monitor daily. Fortunately, only up to 3 years worth of data needs to be kept live in the master-slave db's, so there is a limit to how much data I will have to cope with. David

[PHP] mysqldump

2003-07-25 Thread Marios Adamantopoulos
This is an attempt to create an backup script for my online databases. There are few things to sort out and the coding is not the most effiecient out there yet!!! I just wanted to check on what you guys think, am I going the right way, is there anything I should keep in mind? Mario Code below

Re: [PHP] mysqldump

2003-07-25 Thread Curt Zirzow
* Thus wrote Marios Adamantopoulos ([EMAIL PROTECTED]): This is an attempt to create an backup script for my online databases. There are few things to sort out and the coding is not the most effiecient out there yet!!! I just wanted to check on what you guys think, am I going the right way,

RE: [PHP] mysqldump

2003-07-25 Thread David Smith
]' Subject: Re: [PHP] mysqldump * Thus wrote Marios Adamantopoulos ([EMAIL PROTECTED]): This is an attempt to create an backup script for my online databases. There are few things to sort out and the coding is not the most effiecient out there yet!!! I just wanted to check on what you guys think

RE: [PHP] mysqldump

2003-07-25 Thread Marios Adamantopoulos
-Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Friday, July 25, 2003 10:33 AM To: '[EMAIL PROTECTED]' Subject: Re: [PHP] mysqldump * Thus wrote Marios Adamantopoulos ([EMAIL PROTECTED]): This is an attempt to create an backup script for my online databases

RE: [PHP] mysqldump

2003-07-25 Thread Mike Migurski
Thanks for the replies guys but the main reason I'm doing this is because most times I don't have access to the servers, or not enough preveleges to install myadmin or any other tools. I wish we had our own server but I'm trying for a solution where you can't upload any tools and cannot access

Re: [PHP] mysqldump

2003-07-25 Thread Pete James
Sorry to be a stickler... but _technically_ the backtick is shorthand for shell_exec(). exec and passthru are a little different. Mike Migurski wrote, On 2003/Jul/25 11:12 AM: Thanks for the replies guys but the main reason I'm doing this is because most times I don't have access to the

Re: [PHP] mysqldump

2003-02-27 Thread Sunfire
just make a php file with system calls in it to do mysqldump how secure that is is a different question - Original Message - From: John Taylor-Johnston [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, February 26, 2003 10:43 PM Subject: [PHP] mysqldump Anyone do MySQLDump

[PHP] mysqldump

2003-02-26 Thread John Taylor-Johnston
Anyone do MySQLDump using PHP ? http://www.mysql.com/doc/en/mysqldump.html My code is: mysqldump -u ** -p ** -A /home/mybackups/dump_all.sql I would like to pull it off using PHP, remotely. $date = date (Ymd); $to_path = /home/MyBackups/$date/dump_all.sql; mysqldump -u ** -p

RE: [PHP] MYSQLDUMP

2001-05-15 Thread Robert V. Zwink
mysqldump --opt -u username -p password databasename filename.sql Try mysqldump --help for additional options, or the MySQL manual. Robert Zwink -Original Message- From: TopFive [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 5:06 PM To: [EMAIL PROTECTED] Subject: [PHP

[PHP] MYSQLDUMP

2001-05-08 Thread TopFive
When I attempt to backup my database using MYSQLDUMP, I get repeated syntax error messages from MySQL. This is driving me nuts. I've even attempted the simplest form of the command I can muster: mysqldump mydatabasename dump.sql; Am I overlooking something dreadfully obvious here?

RE: [PHP] MYSQLDUMP

2001-05-08 Thread Jack Dempsey
you should be supplying a password...what's the error? -jack -Original Message- From: TopFive [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 5:06 PM To: [EMAIL PROTECTED] Subject: [PHP] MYSQLDUMP When I attempt to backup my database using MYSQLDUMP, I get repeated syntax