MySQLDump and Restore
Hi All, Am using mySQLDump to backup db as follows mysqldump --databases OURDB -uroot -pROOTPASSWRD dump.sql How can I restore OURDB from dump.sql? Thanks Jim
Re: MySQLDump and Restore
Hello Jim, mysql -u root -p ROOTPASSWD dump.sql Thanks, Abdul. On Fri, 2006-04-21 at 17:02 +1000, Jim wrote: Hi All, Am using mySQLDump to backup db as follows mysqldump --databases OURDB -uroot -pROOTPASSWRD dump.sql How can I restore OURDB from dump.sql? Thanks Jim This email has been Scanned for Viruses! www.newbreak.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MySQLDump and Restore
Or use mysqlimport... Typ 'mysqlimport --help' for further assistance. There are more usefull tools in the bin directory of your mysql installation. HTH, Arjan. -Original Message- From: Mohammed Abdul Azeem [mailto:[EMAIL PROTECTED] Sent: Friday, April 21, 2006 09:03 AM To: Jim Cc: mysql@lists.mysql.com Subject: Re: MySQLDump and Restore Hello Jim, mysql -u root -p ROOTPASSWD dump.sql Thanks, Abdul. On Fri, 2006-04-21 at 17:02 +1000, Jim wrote: Hi All, Am using mySQLDump to backup db as follows mysqldump --databases OURDB -uroot -pROOTPASSWRD dump.sql How can I restore OURDB from dump.sql? Thanks Jim This email has been Scanned for Viruses! www.newbreak.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Binary data mysqldump and restore.
Hi all... !! First, can you CC to [EMAIL PROTECTED], as im not on the mailing list. I have a few tables which are storing a few MB of binary data (like jpegs). I can dump the db fine using mysqldump, but on doing a mysql ... dumpfile i get many errors, as it seems mysql isnt accepting the binary data in the dump file. I get hundreds of errors like: ERROR: Unknown command '\Z'. ERROR: Unknown command '\0'. ERROR: Unknown command '\Z'. ERROR: Unknown command '\0'. ERROR: Unknown command '\'. ERROR 1064: You have an error in your SQL syntax near 'GIF89a2\02\0÷ÿ\0\0\0\0ÀÀÀ\0\0 \Z\0\Z 0\ INSE' at line 1 Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.01 sec) So how do i do this? Thanks, MWP - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
FW: Binary data mysqldump and restore.
Just for those people who have the same problem: -Original Message- From: Mark Williams (MWP) [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 11:13 To: Bert VdB Subject: Re: Binary data mysqldump and restore. That did it thanks! MWP Hi, Have you tried making a dump with the --opt option ? CB. -Original Message- From: Mark Williams (MWP) [mailto:[EMAIL PROTECTED]] Sent: Monday, June 24, 2002 09:57 To: [EMAIL PROTECTED] Subject: Binary data mysqldump and restore. This message uses a character set that is not supported by the Internet Service. To view the original message content, open the attached message. If the text doesn't display correctly, save the attachment to disk, and then open it using a viewer that can display the original character set. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Binary data mysqldump and restore.
If I remember correctly from the manual, you can dump your data generating the SQL statements (this is what you are doing) and your file will have a bunch of INSERTS. Your problem is that those inserts will have something like SET YourBinaryField = 'a-bunch-of-characters'. The problem is that some of the binary data could make the insert impossible to be executed. What I would try is to export the data as a delimited file, then you will have to files, one with your database structure (that you will run first) and another one with the data (delimited by something). Take a look on the manual about this and good luck! --- Mark Williams (MWP) [EMAIL PROTECTED] wrote: Hi all... !! First, can you CC to [EMAIL PROTECTED], as im not on the mailing list. I have a few tables which are storing a few MB of binary data (like jpegs). I can dump the db fine using mysqldump, but on doing a mysql ... dumpfile i get many errors, as it seems mysql isnt accepting the binary data in the dump file. I get hundreds of errors like: ERROR: Unknown command '\Z'. ERROR: Unknown command '\0'. ERROR: Unknown command '\Z'. ERROR: Unknown command '\0'. ERROR: Unknown command '\'. ERROR 1064: You have an error in your SQL syntax near 'GIF89a2\02\0÷ÿ\0\0\0\0ÀÀÀ\0\0 \Z\0\Z 0\ INSE' at line 1 Query OK, 0 rows affected (0.00 sec) Query OK, 1 row affected (0.01 sec) So how do i do this? Thanks, MWP - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php __ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php