Re: backing up database with mysqldump
| From: | dpgirago at mdanderson dot org | Date: | Mon, 25 Oct 2004 20:50:43 +0000 |
| Subject: | Re: backing up database with mysqldump | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37018@lists.php.net to get a copy of this message | ||
Don't you have to specify the databases on the command line when using the
mysql client to load the data as in the second example? I think you have
to have also created them on the backup server.
dave
> David Orlovich wrote on 10/26/2004:
> This is what I do (assuming your user is 'root'):
>
> /path-to-/mysqldump -uroot -pYOURPASSWORD --opt --all-databases >
> backup.sql
>
> Alternatively you can pipe it into another database like so:
> /path-to-/mysqldump -uroot -pYOURPASSWORD --opt --all-databases |
> /path-to-/mysql -hIPADDRESS -uroot -pYOURPASSWORD
> Cheers, David Orlovich
>On 26/10/2004, at 7:53 AM, Perry, Matthew (Fire Marshal's Office) wrote:
>>
>>
>> How do I provide a password?
>>
>> I have been trying -p password[mypass] mysqldump sampledb >
>> ./backup/file.txt
>>
>> -Matt