Re: [PHP-DB] backing up database with mysqldump
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
Re: [PHP-DB] backing up database with mysqldump
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 _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 11:24 AM To: Perry, Matthew (Fire Marshal's Office) Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] backing up database with mysqldump MySQLdump is an executable program. From the command line: C:\>mysqldump databasename > ./path/to/backup/file.sql (or file.txt ) C:\>mysqldump --help gives all the options dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 11:14 AM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] backing up database with mysqldump I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt Dr David Orlovich, Senior Lecturer in Botany. Department of Botany, University of Otago, P.O. Box 56, (Courier: 464 Great King Street) Dunedin, New Zealand. Phone: (03) 479 9060 Fax: (03) 479 7583 Web: http://www.botany.otago.ac.nz/ Ecology, Conservation and Biodiversity Research Group: http://www.otago.ac.nz/erg/ Botanical Society of Otago: http://www.botany.otago.ac.nz/bso/ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] backing up database with mysqldump
Ah, good call. I'm too used to my database user matching my current user from unixland. (no, not root :P) - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 2:10 PM To: Perry, Matthew (Fire Marshal's Office) Cc: [EMAIL PROTECTED] Subject: RE: [PHP-DB] backing up database with mysqldump C:\>mysqldump -uadministrator -p test > test.sql Enter password: ** "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 01:53 PM To: [EMAIL PROTECTED] cc: Subject: RE: [PHP-DB] backing up database with mysqldump How do I provide a password? I have been trying -p password[mypass] mysqldump sampledb > ./backup/file.txt -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 11:24 AM To: Perry, Matthew (Fire Marshal's Office) Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] backing up database with mysqldump MySQLdump is an executable program. >From the command line: C:\>mysqldump databasename > ./path/to/backup/file.sql (or file.txt ) C:\>mysqldump --help gives all the options dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 11:14 AM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] backing up database with mysqldump I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. >From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] backing up database with mysqldump
If you're doing it interactively, you can just give it the -p flag and it will prompt you. Otherwise, I think the problem is you're overdoing it - the flag is either "-p " or "--password=" followed by your password, so "-p mypass" or "--password=mypass". Also, I hope you meant you have been trying mysqldump -p password[mypass] sampledb > ./backup/file.txt This: mysqldump -p sampledb > file.txt Should get you started (and prompt for password), then move on to mysqldump -p mypass sampledb > file.txt Which should output it to the cwd, then you just need to get it going to C:\backup\file.txt - which may, or may not, be as simple as replacing file.txt with that (long time since windows commandline) Cheers, - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -Original Message- From: Perry, Matthew (Fire Marshal's Office) [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 1:53 PM To: [EMAIL PROTECTED] Subject: RE: [PHP-DB] backing up database with mysqldump How do I provide a password? I have been trying -p password[mypass] mysqldump sampledb > ./backup/file.txt -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 11:24 AM To: Perry, Matthew (Fire Marshal's Office) Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] backing up database with mysqldump MySQLdump is an executable program. >From the command line: C:\>mysqldump databasename > ./path/to/backup/file.sql (or file.txt ) C:\>mysqldump --help gives all the options dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 11:14 AM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] backing up database with mysqldump I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. >From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] backing up database with mysqldump
C:\>mysqldump -uadministrator -p test > test.sql Enter password: ** "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 01:53 PM To: [EMAIL PROTECTED] cc: Subject: RE: [PHP-DB] backing up database with mysqldump How do I provide a password? I have been trying -p password[mypass] mysqldump sampledb > ./backup/file.txt -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 11:24 AM To: Perry, Matthew (Fire Marshal's Office) Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] backing up database with mysqldump MySQLdump is an executable program. >From the command line: C:\>mysqldump databasename > ./path/to/backup/file.sql (or file.txt ) C:\>mysqldump --help gives all the options dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 11:14 AM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] backing up database with mysqldump I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. >From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt
RE: [PHP-DB] backing up database with mysqldump
How do I provide a password? I have been trying -p password[mypass] mysqldump sampledb > ./backup/file.txt -Matt _ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, October 25, 2004 11:24 AM To: Perry, Matthew (Fire Marshal's Office) Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] backing up database with mysqldump MySQLdump is an executable program. >From the command line: C:\>mysqldump databasename > ./path/to/backup/file.sql (or file.txt ) C:\>mysqldump --help gives all the options dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 11:14 AM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] backing up database with mysqldump I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. >From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt
Re: [PHP-DB] backing up database with mysqldump
MySQLdump is an executable program. >From the command line: C:\>mysqldump databasename > ./path/to/backup/file.sql (or file.txt ) C:\>mysqldump --help gives all the options dave "Perry, Matthew (Fire Marshal's Office)" <[EMAIL PROTECTED]> 10/25/2004 11:14 AM To: [EMAIL PROTECTED] cc: Subject: [PHP-DB] backing up database with mysqldump I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. >From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt
[PHP-DB] backing up database with mysqldump
I have attempted to follow the documentation for mysqldump both on mysql.com and previous emails to this list server. Unfortunately none of the advice has helped me successfully backup my database. I have been spoiled by phpmyadmin backup procedures and have never had to manually set up a backup system for a local server. >From shell> what should I enter tot to backup my database called "sampdb" to a location "c:/backups"? Everything I have tried spits out an error message. -Matt