Re: mysqldump
| From: | Robert Cummings | Date: | Tue, 17 Aug 2010 18:17:44 +0000 |
| Subject: | Re: mysqldump | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307497@lists.php.net to get a copy of this message | ||
On 10-08-17 02:08 PM, tedd wrote:
Hi gang:Command is wrong... should be:At 6:11 PM -0400 8/13/10, Daniel P. Brown wrote:Easiest method, from the command line on the server from which youwant to dump the database:mysqldump -u user -p database_name> outfile.sql
mysqldump -u user -p password database_name > outfile.sql
That might be the easiest, but all I get is an empty file. I've tried many different variations of the syntax using exec(), but nothing produces any subsistent output. What am I doing wrong?Have you checked the return code of running exec? It may be the mysqldump program isn't in your path.
As for accessing a command line, I am still in the dark as to how to do that.In windows you can do Start -> Run -> cmd.exe to load the command prompt terminal. You could probably put the above mysqldump command directly into the run prompt, but I don't know what it's default path is... but a small tweak might be:
C:\PATH\TO\mysqlump -u user -p password database_name > C:\outfile.sqlCheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized.