Copy database to a file
I have been reading the Reference and saw how to convert my database tables and stuff to the words that made them and puts it into a file. But now I need it I can't find it. If you know how please send along how or a page(s) in the Reference. Karl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Copy database to a file
The command is mysqldump Here's the man file on it: http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html -Original Message- From: Karl Larsen [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 3:09 PM To: mysql@lists.mysql.com Subject: Copy database to a file I have been reading the Reference and saw how to convert my database tables and stuff to the words that made them and puts it into a file. But now I need it I can't find it. If you know how please send along how or a page(s) in the Reference. Karl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
RE: Copy database to a file
I'm running MySQL server 5.0...??? mysql mysqldump --help; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql dump --help' at line 1 -Original Message- From: J.R. Bullington [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 11:32 AM To: mysql@lists.mysql.com Subject: RE: Copy database to a file The command is mysqldump Here's the man file on it: http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html -Original Message- From: Karl Larsen [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 20, 2006 3:09 PM To: mysql@lists.mysql.com Subject: Copy database to a file I have been reading the Reference and saw how to convert my database tables and stuff to the words that made them and puts it into a file. But now I need it I can't find it. If you know how please send along how or a page(s) in the Reference. Karl -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Copy database to a file
On Tuesday 20 June 2006 21:37, Thomas Amundsen wrote: I'm running MySQL server 5.0...??? mysql mysqldump --help; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql dump --help' at line 1 Exit mysql and run mysqldump from the shell. -- Jørn Dahl-Stamnes homepage: http://www.dahl-stamnes.net/dahls/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re[2]: Copy database to a file
Здравствуйте, Thomas. Вы писали 20 июня 2006 г., 23:37:25: TA I'm running MySQL server 5.0...??? mysql mysqldump --help; TA ERROR 1064 (42000): You have an error in your SQL syntax; check the TA manual that TA corresponds to your MySQL server version for the right syntax to use TA near 'mysql TA dump --help' at line 1 You myst use mysqldump command from you shell, not from mysql. TA -Original Message- TA From: J.R. Bullington [mailto:[EMAIL PROTECTED] TA Sent: Tuesday, June 20, 2006 11:32 AM TA To: mysql@lists.mysql.com TA Subject: RE: Copy database to a file TA The command is mysqldump TA Here's the man file on it: TA http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html TA -Original Message- TA From: Karl Larsen [mailto:[EMAIL PROTECTED] TA Sent: Tuesday, June 20, 2006 3:09 PM TA To: mysql@lists.mysql.com TA Subject: Copy database to a file TA I have been reading the Reference and saw how to convert my database TA tables and stuff to the words that made them and puts it into a file. TA But now I need it I can't find it. TA If you know how please send along how or a page(s) in the Reference. TA Karl TA -- TA MySQL General Mailing List TA For list archives: http://lists.mysql.com/mysql TA To unsubscribe: TA http://lists.mysql.com/[EMAIL PROTECTED] TA -- TA MySQL General Mailing List TA For list archives: http://lists.mysql.com/mysql TA To unsubscribe: TA http://lists.mysql.com/[EMAIL PROTECTED] -- С уважением, vitaliy mailto:[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: copy database other than mysqldump
Hello. Have a look here: http://dev.mysql.com/doc/refman/5.0/en/upgrading-to-arch.html http://dev.mysql.com/doc/mysql/en/Moving.html Luke Vanderfluit wrote: Hi. I'm using 4.0.18 and for legacy reasons I can't upgrade that. However I'm upgrading the database to a new schema. I want to copy the database before I make changes to the schema, so that if anything goes wrong, I can revert back. I have a dump file of the database but that is around 5GIG, so takes around an hour to restore. Is there a quicker way to copy a database other than to do a dump. Thanks. Kind regards. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.NET http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Gleb Paharenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.NET ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
copy database other than mysqldump
Hi. I'm using 4.0.18 and for legacy reasons I can't upgrade that. However I'm upgrading the database to a new schema. I want to copy the database before I make changes to the schema, so that if anything goes wrong, I can revert back. I have a dump file of the database but that is around 5GIG, so takes around an hour to restore. Is there a quicker way to copy a database other than to do a dump. Thanks. Kind regards. -- Luke -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: copy database other than mysqldump
You could copy the entire mysql directory structure to an isolated area on disk. This will involve stopping the instance though. Luke Vanderfluit wrote: Hi. I'm using 4.0.18 and for legacy reasons I can't upgrade that. However I'm upgrading the database to a new schema. I want to copy the database before I make changes to the schema, so that if anything goes wrong, I can revert back. I have a dump file of the database but that is around 5GIG, so takes around an hour to restore. Is there a quicker way to copy a database other than to do a dump. Thanks. Kind regards. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: copy database other than mysqldump
You could also try the mysqlhotcopy binary, if it exists in your bin/ directory. I don't remember when that came out, but you might have it. You don't have to stop the instance for that. -Sheeri On 10/20/05, Clyde Lewis [EMAIL PROTECTED] wrote: You could copy the entire mysql directory structure to an isolated area on disk. This will involve stopping the instance though. Luke Vanderfluit wrote: Hi. I'm using 4.0.18 and for legacy reasons I can't upgrade that. However I'm upgrading the database to a new schema. I want to copy the database before I make changes to the schema, so that if anything goes wrong, I can revert back. I have a dump file of the database but that is around 5GIG, so takes around an hour to restore. Is there a quicker way to copy a database other than to do a dump. Thanks. Kind regards. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Copy Database
How can I copy all the tables in a database that I am developing using 5.0 to a production database that uses 4.1.8? All the tables are InnoDB tables. Regards, Maru -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Copy Database
mysqldump Maru, Mulugeta wrote: How can I copy all the tables in a database that I am developing using 5.0 to a production database that uses 4.1.8? All the tables are InnoDB tables. Regards, Maru -- |...| | _ _|Victor Medina M | |\ \ \| | _ \ / \ |Linux - Java - MySQL | | \ \ \ _| | |_) / _ \ |Dpto. Sistemas - Ferreteria EPA | | / / / |___| __/ ___ \ |[EMAIL PROTECTED] | |/_/_/|_|_| /_/ \_\|Tel: +58-241-8507325 - ext. 325 | ||Cel: +58-412-8859934 | ||geek by nature - linux by choice | |...| -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
copy database
HI List, Using version 4.0.15 I'm trying to copy a database. Copy db1 to (new) db2. So I created db2. And then tried the following and got the subsequent errors. # mysqldump --add-drop-table db1 | mysql db2 ERROR 1064 at line 399: You have an error in your SQL syntax near 'count(count), KEY dataID(dataID) ) TYPE=MyISAM' at line 15 # mysqldump --opt db1 | mysql db2 ERROR 1065 at line 23: Query was empty Any insight would be very helpful Thanks Michael
Re: copy database
DePhillips, Michael P [EMAIL PROTECTED] wrote: Using version 4.0.15 I'm trying to copy a database. Copy db1 to (new) db2. So I created db2. And then tried the following and got the subsequent errors. # mysqldump --add-drop-table db1 | mysql db2 ERROR 1064 at line 399: You have an error in your SQL syntax near 'count(count), KEY dataID(dataID) ) TYPE=MyISAM' at line 15 Is MySQL server running in the ansi mode? If so, 'count' is treated as a reserved word. Use -Q option of mysqldump. # mysqldump --opt db1 | mysql db2 ERROR 1065 at line 23: Query was empty Check line 23 of the dump file. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: copy database
In a message dated 9/30/03 1:33:07 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: HI List, Using version 4.0.15 I'm trying to copy a database. Copy db1 to (new) db2. So I created db2. And then tried the following and got the subsequent errors. # mysqldump --add-drop-table db1 | mysql db2 ERROR 1064 at line 399: You have an error in your SQL syntax near 'count(count), KEY dataID(dataID) ) TYPE=MyISAM' at line 15 Why not just copy the [MySQL-data-dir]\DB1 to [MySQL-data-dir]\DB2? That works for me, even when I am moving/copying a database from a Windows machine to a Linux machine. Hope this helps. Tony -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: copy database
At 14:54 -0400 9/30/03, [EMAIL PROTECTED] wrote: In a message dated 9/30/03 1:33:07 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: HI List, Using version 4.0.15 I'm trying to copy a database. Copy db1 to (new) db2. So I created db2. And then tried the following and got the subsequent errors. # mysqldump --add-drop-table db1 | mysql db2 ERROR 1064 at line 399: You have an error in your SQL syntax near 'count(count), KEY dataID(dataID) ) TYPE=MyISAM' at line 15 Why not just copy the [MySQL-data-dir]\DB1 to [MySQL-data-dir]\DB2? That works for me, even when I am moving/copying a database from a Windows machine to a Linux machine. What if you have InnoDB tables? -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: copy database
In a message dated 9/30/03 3:13:59 PM Eastern Daylight Time, [EMAIL PROTECTED] writes: What if you have InnoDB tables? I don't. ;-) But I'd certainly like to know other strategies. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Copy database to another Server
William IT wrote: I do mysqlamin shutdown and copy all /var/lib/mysql file from another MySQL server. And then run: chmod -R 660 * Try 770 Mysql needs to be able to scan the directories to find tables. chown -R mysql:mysql * shutdown now -r But I can't logon to Mysql. What's wrong? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Copy database to another Server
I do mysqlamin shutdown and copy all /var/lib/mysql file from another MySQL server. And then run: chmod -R 660 * chown -R mysql:mysql * shutdown now -r But I can't logon to Mysql. What's wrong? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Copy database to another Server
At 11:54 +0800 6/11/03, William IT wrote: I do mysqlamin shutdown and copy all /var/lib/mysql file from another MySQL server. And then run: chmod -R 660 * chown -R mysql:mysql * shutdown now -r But I can't logon to Mysql. What's wrong? We don't know. Did the server start up correctly? If it did, how did you try to connect to the server? What happened? Did you get an error message? -- Paul DuBois, Senior Technical Writer Madison, Wisconsin, USA MySQL AB, www.mysql.com Are you MySQL certified? http://www.mysql.com/certification/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Copy Database?
Hi mysql list, I have a a database lest say called test which is about a gig in size. I want to take a copy of that database and call it test2 and have it running on the same server. I could just do a dump and then insert the dump back in but this seems a rather long way of doing it. I had a search on the mysql.com site but can't find anything. Any ideas? Cheers John Wards SportNetwork.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Copy Database?
I have a a database lest say called test which is about a gig in size. I want to take a copy of that database and call it test2 and have it running on the same server. I could just do a dump and then insert the dump back in but this seems a rather long way of doing it. I had a search on the mysql.com site but can't find anything. If you are using MyISAM tableas and can stop the server, you can simply copy the directory test in the mysql data directory to test2. You should not do this while the server si running because mysql caches data and the files may not be up-to-date. If you are using another table type, you could look at the CREATE TABLE SELECT command. Alec Cawley -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Copy Database?
John Wards [EMAIL PROTECTED] wrote: I have a a database lest say called test which is about a gig in size. I want to take a copy of that database and call it test2 and have it running on the same server. I could just do a dump and then insert the dump back in but this seems a rather long way of doing it. I had a search on the mysql.com site but can't find anything. You can use CREATE ... SELECT statement: http://www.mysql.com/doc/en/CREATE_TABLE.html but you should create indexes manually. You can also change output of SHOW CREATE TABLE test and change table name to test2 and then use INSERT .. SELECT statement. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Copy database question
Hi everybody, I am new on mysql. I use phpadmin for adminstration. My problem: I have Database 1, table userdata, field username I need to copy the above mentioned data to: Database2, Table chat_data, field nick I have no clue how to do it! Can anybody tell me the string? Thanks for help! Tom - 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
Copy database question
Hi everybody, I am new on mysql. I use phpadmin for adminstration. My problem: I have Database 1, table userdata, field username I need to copy the above mentioned data to: Database2, Table chat_data, field nick I have no clue how to do it! Can anybody tell me the string? Thanks for help! Tom - 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: Copy database question
Tom, I have Database 1, table userdata, field username I need to copy the above mentioned data to: Database2, Table chat_data, field nick in phpMyAdmin 2.3.3pl1 you can accomplish this as follows: 1. Choose Database 1 in the left frame. 2. Click table userdata in the left frame. 3. Click the Operations tab in the right frame. 4. Choose Copy table to (database.table) in the right frame. 5. Choose Database 2 (must exist), fill in chat_data, choose Structure and data. Klick Go. 6. Choose Database 2 and then chat_data in the left frame. 7. Click the Structure tab in the right frame. 8. For column username, click Change, fill in nick, click Save. Regards, -- Stefan Hinz [EMAIL PROTECTED] Geschäftsführer / CEO iConnect GmbH http://iConnect.de Heesestr. 6, 12169 Berlin (Germany) Tel: +49 30 7970948-0 Fax: +49 30 7970948-3 - Original Message - From: Tom Nickels [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, January 21, 2003 1:23 PM Subject: Copy database question Hi everybody, I am new on mysql. I use phpadmin for adminstration. My problem: I have Database 1, table userdata, field username I need to copy the above mentioned data to: Database2, Table chat_data, field nick I have no clue how to do it! Can anybody tell me the string? Thanks for help! Tom - 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 - 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: Copy database question
* Tom Nickels I have Database 1, table userdata, field username I need to copy the above mentioned data to: Database2, Table chat_data, field nick I have no clue how to do it! Can anybody tell me the string? If the destination table already exist, something like this: INSERT INTO Database2.chat_data SELECT username AS nick FROM `Database 1`.userdata URL: http://www.mysql.com/doc/en/INSERT_SELECT.html Note the backticks used for the database name containing a space: URL: http://www.mysql.com/doc/en/Legal_names.html -- Roger - 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