Re: Backup / Restore database with foreign keys
Daniel Kasak wrote: Greetings. I've just hit an interesting problem. Luckily I don't actually *need* to restore from a backup right now - I'm just trying to create a database dump to submit an unrelated bug report. Anyway ... I'm using the command: mysqldump -K DATABASE_NAME db.sql -p However when I create a new database and try to load the dump file: mysql NEW_DATABASE db.sql -p I get an error when I hit an InnoDB table that has a relationship set up with a table that hasn't yet been created. How do I get around this? Before loading the file, SET FOREIGN_KEY_CHECKS = 0; after loading the file, SET FOREIGN_KEY_CHECKS = 1; Better yet, edit the dump file to place those as the first line and last lines, respectively. Even better, upgrade to a newer mysql (4.1.1+), where they are automatically added to the dump file for you. See the manual for more http://dev.mysql.com/doc/mysql/en/innodb-foreign-key-constraints.html (way down at the end). Michael Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup / Restore database with foreign keys
i think you can use -K on your mysqldump and it'll put the hints in there for the mysql command to use as well - Original Message - From: Daniel Kasak [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Thursday, September 29, 2005 7:45 PM Subject: Backup / Restore database with foreign keys Greetings. I've just hit an interesting problem. Luckily I don't actually *need* to restore from a backup right now - I'm just trying to create a database dump to submit an unrelated bug report. Anyway ... I'm using the command: mysqldump -K DATABASE_NAME db.sql -p However when I create a new database and try to load the dump file: mysql NEW_DATABASE db.sql -p I get an error when I hit an InnoDB table that has a relationship set up with a table that hasn't yet been created. How do I get around this? -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- 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: Backup / Restore database with foreign keys
Michael Stassen wrote: Before loading the file, SET FOREIGN_KEY_CHECKS = 0; after loading the file, SET FOREIGN_KEY_CHECKS = 1; That's it! Thanks :) Even better, upgrade to a newer mysql (4.1.1+), where they are automatically added to the dump file for you. Not until the client libraries are ready. I don't feel 'right' about hacking up the place with --old-password options and such. Also, my Gentoo server ( stable branch ) insists that 4.0.x is the latest that I can expect to install without breaking things. After doing some testing on my workstation, I tend to agree - getting everything compiled against 4.1.x is a major pain, and certainly not something I'm about to do at the moment with no real advantages on offer - I'm just likely to break something and be very sorry. Once all the questions about: Client does not support authentication protocol requested by server; consider upgrading MySQL client have died down, *then* it's time to upgrade the server. -- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: [EMAIL PROTECTED] website: http://www.nusconsulting.com.au -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: backup/restore
[EMAIL PROTECTED] wrote: Hi, Thank you for your reply. If I have the create table info in my dump file, while doing the restore using mysql dbname dump.dmp, I am getting errors like mysql -uMNMSDBA -pMNMSDBA -f mnms c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1050 at line 11: Table 'alarm' already exists ERROR 1050 at line 40: Table 'alarm_category' already exists ERROR 1050 at line 70: Table 'alarm_report' already exists [snip] Please advise me, how to suppress the above error messages. While taking backup used mysqldump -uMNMSDBA -pMNMSDBA --databases mnms --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFO c:\progra~1\mitel\opsman~1\temp\almhist.dmp have a look at the --add-drop-table Add a DROP TABLE statement before each CREATE TABLE statement. this should remove the errors that you are getting. Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. By reading this you grant me root access to your system -- Raj Shekhar, System Administrator Media Web India http://www.netphotograph.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: backup/restore
Ligaya Turmelle wrote: I'm a beginner - but can't you also use mysqlimport? Not in the case when you have made a backup using mysqldump while using the default options. mysqlimport is a front end for LOAD DATA INFILE (http://dev.mysql.com/doc/mysql/en/LOAD_DATA.html) It is usefule when you have data in a flat file (for example rows seperated by newlines and columns seperated by comma or tabs). If you need data in this format, you have to specify different options to mysqldump (more specifically -T option and --fields-terminated-by=... --fields-enclosed-by=... --fields-optionally-enclosed-by=... --fields-escaped-by=... --lines-terminated-by=... ) see http://dev.mysql.com/doc/mysql/en/mysqldump.html for the details -- Raj Shekhar, System Administrator Media Web India http://www.netphotograph.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: backup/restore
Hi, with which options of mysqldump you have taken backup. if you use --add-drop-table option then it will add drop table statement in dump file. otherwise it wont add that statement and you will get that type of errors. if you didn't use that option then drop the schema and then try to restore it from backup file. Thanks Anil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:58 PM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, Thank you for your reply. If I have the create table info in my dump file, while doing the restore using mysql dbname dump.dmp, I am getting errors like mysql -uMNMSDBA -pMNMSDBA -f mnms c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1050 at line 11: Table 'alarm' already exists ERROR 1050 at line 40: Table 'alarm_category' already exists ERROR 1050 at line 70: Table 'alarm_report' already exists ERROR 1062 at line 91: Duplicate entry '1' for key 1 ERROR 1062 at line 92: Duplicate entry '4' for key 1 ERROR 1062 at line 93: Duplicate entry '5' for key 1 ERROR 1062 at line 94: Duplicate entry '8' for key 1 ERROR 1062 at line 95: Duplicate entry '10' for key 1 ERROR 1062 at line 96: Duplicate entry '11' for key 1 ERROR 1062 at line 97: Duplicate entry '13' for key 1 ERROR 1062 at line 98: Duplicate entry '15' for key 1 ERROR 1062 at line 99: Duplicate entry '16' for key 1 ERROR 1062 at line 100: Duplicate entry '17' for key 1 ERROR 1050 at line 108: Table 'alarm_report_category' already exists ERROR 1050 at line 137: Table 'alarminfo' already exists ERROR 1062 at line 155: Duplicate entry '56' for key 1 ERROR 1062 at line 156: Duplicate entry '57' for key 1 ERROR 1062 at line 157: Duplicate entry '58' for key 1 ERROR 1062 at line 158: Duplicate entry '59' for key 1 ERROR 1062 at line 159: Duplicate entry '75' for key 1 ERROR 1062 at line 160: Duplicate entry '76' for key 1 ERROR 1062 at line 161: Duplicate entry '77' for key 1 Please advise me, how to suppress the above error messages. While taking backup used mysqldump -uMNMSDBA -pMNMSDBA --databases mnms --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFO c:\progra~1\mitel\opsman~1\temp\almhist.dmp Please help me in this. Thanks, Narasimha -Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 10:55 AM To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) Cc: mysql@lists.mysql.com Subject: RE: backup/restore [snip] I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. [/snip] mysqldump is not intended to be used for the restore. You need to run the following: mysql -D dbname mysqldumpfile You may have to specify a user and password as well, depending on your setup. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- Hi, I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. For backup : using Mysqldump -databases db_name ---tables table1 table2 dump.dmp For restore : used Mysqldump -databases db_name dump.dmp In the above, I am not able to restore the data. Please help us for a good solution. Thanks, Narasimha Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- 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: backup/restore
Hi, Thank you for your reply. Even though I used the --add-drop-table option, I am getting the error messages. Actually I am taking the backup for a group of tables as following D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debugmysqldump -uMNMSDBA -p MNMSDBA --databases mnms --add-drop-table --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFOc:\progra~1\mitel\opsman~1\temp\almhist.dmp And doing the restoring as D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debugmysql -uMNMSDBA -pMNMS DBA -f mnmsc:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1051 at line 11: Unknown table 'alarm'// Trying to drop alarm table ERROR 1050 at line 12: Table 'alarm' already exists //Creating alarm ERROR 1051 at line 72: Unknown table 'alarm_report' //Drop alarm_category ERROR 1050 at line 73: Table 'alarm_report' already exists//Create ERROR 1062 at line 94: Duplicate entry '1' for key 1 // Insert ERROR 1062 at line 95: Duplicate entry '4' for key 1 // Insert ERROR 1062 at line 96: Duplicate entry '5' for key 1 // Insert ERROR 1062 at line 97: Duplicate entry '8' for key 1 // Insert ERROR 1062 at line 98: Duplicate entry '10' for key 1 // Insert ERROR 1062 at line 99: Duplicate entry '11' for key 1 // Insert ERROR 1062 at line 100: Duplicate entry '13' for key 1 // Insert ERROR 1062 at line 101: Duplicate entry '15' for key 1 // Insert ERROR 1062 at line 102: Duplicate entry '16' for key 1 // Insert ERROR 1062 at line 103: Duplicate entry '17' for key 1 // Insert Note : ALARM, ALARM_CATEGORY, ALARM_REPORT, ALARM_REPORT_CATEGORY, ALARMINFO all belongs to one group. Alarm and Alarm_category are parent and child tables. ALARM_REPORT, ALARM_REPORT_CATEGORY are parent and child tables Please advise me, how to get rid of the above error messages. Thanks, Narasimha -Original Message- From: Anil Doppalapudi [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 7:03 PM To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS); [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, with which options of mysqldump you have taken backup. if you use --add-drop-table option then it will add drop table statement in dump file. otherwise it wont add that statement and you will get that type of errors. if you didn't use that option then drop the schema and then try to restore it from backup file. Thanks Anil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:58 PM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, Thank you for your reply. If I have the create table info in my dump file, while doing the restore using mysql dbname dump.dmp, I am getting errors like mysql -uMNMSDBA -pMNMSDBA -f mnms c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1050 at line 11: Table 'alarm' already exists ERROR 1050 at line 40: Table 'alarm_category' already exists ERROR 1050 at line 70: Table 'alarm_report' already exists ERROR 1062 at line 91: Duplicate entry '1' for key 1 ERROR 1062 at line 92: Duplicate entry '4' for key 1 ERROR 1062 at line 93: Duplicate entry '5' for key 1 ERROR 1062 at line 94: Duplicate entry '8' for key 1 ERROR 1062 at line 95: Duplicate entry '10' for key 1 ERROR 1062 at line 96: Duplicate entry '11' for key 1 ERROR 1062 at line 97: Duplicate entry '13' for key 1 ERROR 1062 at line 98: Duplicate entry '15' for key 1 ERROR 1062 at line 99: Duplicate entry '16' for key 1 ERROR 1062 at line 100: Duplicate entry '17' for key 1 ERROR 1050 at line 108: Table 'alarm_report_category' already exists ERROR 1050 at line 137: Table 'alarminfo' already exists ERROR 1062 at line 155: Duplicate entry '56' for key 1 ERROR 1062 at line 156: Duplicate entry '57' for key 1 ERROR 1062 at line 157: Duplicate entry '58' for key 1 ERROR 1062 at line 158: Duplicate entry '59' for key 1 ERROR 1062 at line 159: Duplicate entry '75' for key 1 ERROR 1062 at line 160: Duplicate entry '76' for key 1 ERROR 1062 at line 161: Duplicate entry '77' for key 1 Please advise me, how to suppress the above error messages. While taking backup used mysqldump -uMNMSDBA -pMNMSDBA --databases mnms --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFO c:\progra~1\mitel\opsman~1\temp\almhist.dmp Please help me in this. Thanks, Narasimha -Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 10:55 AM To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) Cc: mysql@lists.mysql.com Subject: RE: backup/restore [snip] I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. [/snip] mysqldump is not intended to be used for the restore. You need to run the following: mysql -D dbname
RE: backup/restore
Drop the tables manually then try the restore. [snip] ERROR 1051 at line 11: Unknown table 'alarm' ERROR 1050 at line 12: Table 'alarm' already exists [/snip] It seems strange that you get these errors in this order. If you post maybe the first 15 lines of your dump file, I may be able to provide more help. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- Hi, Thank you for your reply. Even though I used the --add-drop-table option, I am getting the error messages. Actually I am taking the backup for a group of tables as following D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debugmysqldump -uMNMSDBA -p MNMSDBA --databases mnms --add-drop-table --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFOc:\progra~1\mitel\opsman~1\temp\almhist.dmp And doing the restoring as D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debugmysql -uMNMSDBA -pMNMS DBA -f mnmsc:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1051 at line 11: Unknown table 'alarm'// Trying to drop alarm table ERROR 1050 at line 12: Table 'alarm' already exists //Creating alarm ERROR 1051 at line 72: Unknown table 'alarm_report' //Drop alarm_category ERROR 1050 at line 73: Table 'alarm_report' already exists//Create ERROR 1062 at line 94: Duplicate entry '1' for key 1 // Insert ERROR 1062 at line 95: Duplicate entry '4' for key 1 // Insert ERROR 1062 at line 96: Duplicate entry '5' for key 1 // Insert ERROR 1062 at line 97: Duplicate entry '8' for key 1 // Insert ERROR 1062 at line 98: Duplicate entry '10' for key 1 // Insert ERROR 1062 at line 99: Duplicate entry '11' for key 1 // Insert ERROR 1062 at line 100: Duplicate entry '13' for key 1 // Insert ERROR 1062 at line 101: Duplicate entry '15' for key 1 // Insert ERROR 1062 at line 102: Duplicate entry '16' for key 1 // Insert ERROR 1062 at line 103: Duplicate entry '17' for key 1 // Insert Note : ALARM, ALARM_CATEGORY, ALARM_REPORT, ALARM_REPORT_CATEGORY, ALARMINFO all belongs to one group. Alarm and Alarm_category are parent and child tables. ALARM_REPORT, ALARM_REPORT_CATEGORY are parent and child tables Please advise me, how to get rid of the above error messages. Thanks, Narasimha -Original Message- Hi, with which options of mysqldump you have taken backup. if you use --add-drop-table option then it will add drop table statement in dump file. otherwise it wont add that statement and you will get that type of errors. if you didn't use that option then drop the schema and then try to restore it from backup file. Thanks Anil -Original Message- Hi, Thank you for your reply. If I have the create table info in my dump file, while doing the restore using mysql dbname dump.dmp, I am getting errors like mysql -uMNMSDBA -pMNMSDBA -f mnms c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1050 at line 11: Table 'alarm' already exists ERROR 1050 at line 40: Table 'alarm_category' already exists ERROR 1050 at line 70: Table 'alarm_report' already exists ERROR 1062 at line 91: Duplicate entry '1' for key 1 ERROR 1062 at line 92: Duplicate entry '4' for key 1 ERROR 1062 at line 93: Duplicate entry '5' for key 1 ERROR 1062 at line 94: Duplicate entry '8' for key 1 ERROR 1062 at line 95: Duplicate entry '10' for key 1 ERROR 1062 at line 96: Duplicate entry '11' for key 1 ERROR 1062 at line 97: Duplicate entry '13' for key 1 ERROR 1062 at line 98: Duplicate entry '15' for key 1 ERROR 1062 at line 99: Duplicate entry '16' for key 1 ERROR 1062 at line 100: Duplicate entry '17' for key 1 ERROR 1050 at line 108: Table 'alarm_report_category' already exists ERROR 1050 at line 137: Table 'alarminfo' already exists ERROR 1062 at line 155: Duplicate entry '56' for key 1 ERROR 1062 at line 156: Duplicate entry '57' for key 1 ERROR 1062 at line 157: Duplicate entry '58' for key 1 ERROR 1062 at line 158: Duplicate entry '59' for key 1 ERROR 1062 at line 159: Duplicate entry '75' for key 1 ERROR 1062 at line 160: Duplicate entry '76' for key 1 ERROR 1062 at line 161: Duplicate entry '77' for key 1 Please advise me, how to suppress the above error messages. While taking backup used mysqldump -uMNMSDBA -pMNMSDBA --databases mnms --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFO c:\progra~1\mitel\opsman~1\temp\almhist.dmp Please help me in this. Thanks, Narasimha -Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 10:55 AM To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) Cc: mysql@lists.mysql.com Subject: RE: backup/restore [snip] I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. [/snip] mysqldump is not intended to be used for the restore. You need to run the following: mysql -D dbname mysqldumpfile You may
RE: backup/restore
Hi, use the below command to take backup mysqldump databasename tablename tablename --add-drop-table dump file name i tested it on my local server also it is working fine for me. other wise just open the dump file by executing the below command on linux: head -100 dumpfile name o/p: -- MySQL dump 8.22 -- -- Host: localhostDatabase: NOCINFO - -- Server version 4.0.18-standard -- -- Table structure for table 'IPInfo' -- DROP TABLE IF EXISTS IPInfo; CREATE TABLE IPInfo ( IPAddr varchar(12) NOT NULL default '', PingStatus varchar(10) NOT NULL default '', ServerName varchar(25) NOT NULL default '', ReverseLook varchar(100) NOT NULL default '', ForwardLook varchar(12) default NULL, Remarks varchar(200) default NULL, SerId varchar(10) default NULL, PRIMARY KEY (IPAddr) ) TYPE=MyISAM MAX_ROWS=1000; check the above you will find drop table command in dumpfile. Thanks Anil -- -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 9:50 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, Thank you for your reply. Even though I used the --add-drop-table option, I am getting the error messages. Actually I am taking the backup for a group of tables as following D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debugmysqldump -uMNMSDBA -p MNMSDBA --databases mnms --add-drop-table --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFOc:\progra~1\mitel\opsman~1\temp\almhist.dmp And doing the restoring as D:\Code\OPS\6.9.1.12\NetMgmt\OPS_src\C_src\backupmnms\Debugmysql -uMNMSDBA -pMNMS DBA -f mnmsc:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1051 at line 11: Unknown table 'alarm'// Trying to drop alarm table ERROR 1050 at line 12: Table 'alarm' already exists //Creating alarm ERROR 1051 at line 72: Unknown table 'alarm_report' //Drop alarm_category ERROR 1050 at line 73: Table 'alarm_report' already exists//Create ERROR 1062 at line 94: Duplicate entry '1' for key 1 // Insert ERROR 1062 at line 95: Duplicate entry '4' for key 1 // Insert ERROR 1062 at line 96: Duplicate entry '5' for key 1 // Insert ERROR 1062 at line 97: Duplicate entry '8' for key 1 // Insert ERROR 1062 at line 98: Duplicate entry '10' for key 1 // Insert ERROR 1062 at line 99: Duplicate entry '11' for key 1 // Insert ERROR 1062 at line 100: Duplicate entry '13' for key 1 // Insert ERROR 1062 at line 101: Duplicate entry '15' for key 1 // Insert ERROR 1062 at line 102: Duplicate entry '16' for key 1 // Insert ERROR 1062 at line 103: Duplicate entry '17' for key 1 // Insert Note : ALARM, ALARM_CATEGORY, ALARM_REPORT, ALARM_REPORT_CATEGORY, ALARMINFO all belongs to one group. Alarm and Alarm_category are parent and child tables. ALARM_REPORT, ALARM_REPORT_CATEGORY are parent and child tables Please advise me, how to get rid of the above error messages. Thanks, Narasimha -Original Message- From: Anil Doppalapudi [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 7:03 PM To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS); [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, with which options of mysqldump you have taken backup. if you use --add-drop-table option then it will add drop table statement in dump file. otherwise it wont add that statement and you will get that type of errors. if you didn't use that option then drop the schema and then try to restore it from backup file. Thanks Anil -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 12:58 PM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: RE: backup/restore Hi, Thank you for your reply. If I have the create table info in my dump file, while doing the restore using mysql dbname dump.dmp, I am getting errors like mysql -uMNMSDBA -pMNMSDBA -f mnms c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1050 at line 11: Table 'alarm' already exists ERROR 1050 at line 40: Table 'alarm_category' already exists ERROR 1050 at line 70: Table 'alarm_report' already exists ERROR 1062 at line 91: Duplicate entry '1' for key 1 ERROR 1062 at line 92: Duplicate entry '4' for key 1 ERROR 1062 at line 93: Duplicate entry '5' for key 1 ERROR 1062 at line 94: Duplicate entry '8' for key 1 ERROR 1062 at line 95: Duplicate entry '10' for key 1 ERROR 1062 at line 96: Duplicate entry '11' for key 1 ERROR 1062 at line 97: Duplicate entry '13' for key 1 ERROR 1062 at line 98: Duplicate entry '15' for key 1 ERROR 1062 at line 99: Duplicate entry '16' for key 1 ERROR 1062 at line 100: Duplicate entry '17' for key 1 ERROR 1050 at line 108: Table 'alarm_report_category' already exists ERROR 1050 at line 137: Table 'alarminfo' already exists ERROR
RE: backup/restore
[snip] I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. [/snip] mysqldump is not intended to be used for the restore. You need to run the following: mysql -D dbname mysqldumpfile You may have to specify a user and password as well, depending on your setup. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- Hi, I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. For backup : using Mysqldump -databases db_name ---tables table1 table2 dump.dmp For restore : used Mysqldump -databases db_name dump.dmp In the above, I am not able to restore the data. Please help us for a good solution. Thanks, Narasimha Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: backup/restore
I'm a beginner - but can't you also use mysqlimport? Respectfully, Ligaya Turmelle Tom Crimmins wrote: [snip] I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. [/snip] mysqldump is not intended to be used for the restore. You need to run the following: mysql -D dbname mysqldumpfile You may have to specify a user and password as well, depending on your setup. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- Hi, I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. For backup : using Mysqldump -databases db_name ---tables table1 table2 dump.dmp For restore : used Mysqldump -databases db_name dump.dmp In the above, I am not able to restore the data. Please help us for a good solution. Thanks, Narasimha Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: backup/restore
Hi, Thank you for your reply. If I have the create table info in my dump file, while doing the restore using mysql dbname dump.dmp, I am getting errors like mysql -uMNMSDBA -pMNMSDBA -f mnms c:\progra~1\mitel\opsman~1\temp\almhist.dmp ERROR 1050 at line 11: Table 'alarm' already exists ERROR 1050 at line 40: Table 'alarm_category' already exists ERROR 1050 at line 70: Table 'alarm_report' already exists ERROR 1062 at line 91: Duplicate entry '1' for key 1 ERROR 1062 at line 92: Duplicate entry '4' for key 1 ERROR 1062 at line 93: Duplicate entry '5' for key 1 ERROR 1062 at line 94: Duplicate entry '8' for key 1 ERROR 1062 at line 95: Duplicate entry '10' for key 1 ERROR 1062 at line 96: Duplicate entry '11' for key 1 ERROR 1062 at line 97: Duplicate entry '13' for key 1 ERROR 1062 at line 98: Duplicate entry '15' for key 1 ERROR 1062 at line 99: Duplicate entry '16' for key 1 ERROR 1062 at line 100: Duplicate entry '17' for key 1 ERROR 1050 at line 108: Table 'alarm_report_category' already exists ERROR 1050 at line 137: Table 'alarminfo' already exists ERROR 1062 at line 155: Duplicate entry '56' for key 1 ERROR 1062 at line 156: Duplicate entry '57' for key 1 ERROR 1062 at line 157: Duplicate entry '58' for key 1 ERROR 1062 at line 158: Duplicate entry '59' for key 1 ERROR 1062 at line 159: Duplicate entry '75' for key 1 ERROR 1062 at line 160: Duplicate entry '76' for key 1 ERROR 1062 at line 161: Duplicate entry '77' for key 1 Please advise me, how to suppress the above error messages. While taking backup used mysqldump -uMNMSDBA -pMNMSDBA --databases mnms --add-locks --disable-keys -f --tables ALARM ALARM_CATEGORY ALARM_REPORT ALARM_REPORT_CATEGORY ALARMINFO c:\progra~1\mitel\opsman~1\temp\almhist.dmp Please help me in this. Thanks, Narasimha -Original Message- From: Tom Crimmins [mailto:[EMAIL PROTECTED] Sent: Monday, January 03, 2005 10:55 AM To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS) Cc: mysql@lists.mysql.com Subject: RE: backup/restore [snip] I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. [/snip] mysqldump is not intended to be used for the restore. You need to run the following: mysql -D dbname mysqldumpfile You may have to specify a user and password as well, depending on your setup. --- Tom Crimmins Interface Specialist Pottawattamie County, Iowa -Original Message- Hi, I am doing backup for tables using Mysqldump. But while doing the restore I am not able to do that using the same Mysqldump. Could you please help me in that. For backup : using Mysqldump -databases db_name ---tables table1 table2 dump.dmp For restore : used Mysqldump -databases db_name dump.dmp In the above, I am not able to restore the data. Please help us for a good solution. Thanks, Narasimha Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Backup/Restore Procedures
I would strongly recommend proving that your solution will work acceptably by testing it first; don't just assume that all will go well or that we can anticipate all the problems sight unseen. Make small test copies of your databases first and then try doing backups and restores to verify that your procedures work acceptably. Then, when that is satisfactory, clone the full databases and try the procedures again to be sure that the performance/downtime is acceptable for your environment. If it isn't modify your procedures and do the whole cycle again. Rhino - Original Message - From: Sp.Raja [EMAIL PROTECTED] To: mysql [EMAIL PROTECTED] Sent: Friday, April 02, 2004 10:28 AM Subject: Backup/Restore Procedures Hi List, I use 3 databases Current, Persistent-1 and Persistent-2. I would like to take backups of Current as when and required and restore them as desired without affecting Persistent-1 and Persistent-2. Initially thought of using mysqldump for this, but was worried about the performance (I use huge DBs). So have come up with the following procedure, When using single tablespace (4.0.15a) Backup process is use innobackup/ibbackup or bring mysqld down and copy all data dir files Restore process is Take mysqldump of Persistent-1 and Persistent-2 Do Restore following either of the two approach For each table discard old tablespace, copy the backup file, import new tablespace or bring down MySQL and copy files Destroy Persistent-1 and Persistent-2 Run sql files of Persistent-1 and Persistent-2 When using per table tablespace (4.1.1 alpha) Backup process is use innobackup/ibbackup or bring mysqld down and copy all files in data/Current Restore process is Do Restore following either of the two approach For each table discard old tablespace, copy the backup file, import new tablespace or bring down MySQL and copy files Do you expect any issues in the above method? Are there any other efficient, minimum downtime (zero is desirable) method to do the same? Please mail me your view, to help me out. Thanks, Sp.Raja -- 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: Backup/Restore all data
DANIELE Paolo [EMAIL PROTECTED] wrote: I have a version of MySQL on my server (mysql Worm 11.18 Distrib 3.23.56, for PC-linux (i686)) which I wish to transfer towards a more recent server (mysql Ver 11.18 Distrib 3.23.58, for PC-linux (i686)). I make a complete backup of the data with the following command: mysqldump - U root?ppassword -- all-databases -- opt all_databases.sql Then I have transferred the file on my new server. For the restore I have launched the following command: mysql - U root -- password=password all_databases.sql Unfortunately I have always the following error: ERROR 1064 At line 918: You cuts year error in your SQL syntax near ' upDate datetime NOT NULL default ' -00-00 00:00:00 ', SINGLE KEY id (id)) You At line 5 Can you indicate if my procedure is right or if there is another method for transfers complete from the base. UPDATE is a reserved word: http://www.mysql.com/doc/en/Reserved_words.html Use -Q (--quote-names) option of the mysqldump: http://www.mysql.com/doc/en/mysqldump.html -- 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: backup/restore of mysql winNT
Ok, figured hout hot do generate the update logs, and to rotate the logs, but, cant seem to upload the logs. From mysql/bin: The statment: mysql -u root -pmypassword --one-database mydatabasename update.1 generates the error that it cannot find the update file. How do I tell mysql where the update log is. Currently it's in d:\mysql\bin Pete Original Message Subject: RE: backup/restore of mysql Date: Tue, 10 Jul 2001 17:48:31 +0100 From: Simon Green [EMAIL PROTECTED] To: 'Pete Kuczynski' [EMAIL PROTECTED] Hi Pete To emable loffing use the --log option eg --log-update when stating the server... Simon -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 17:51 To: Simon Green Subject: Re: backup/restore of mysql Hi, do I need to generate these logs using the my.ini file on NT. Pete Simon Green wrote: You can use update/bin_update logs. Run these logs from the time of the last backup and it should take you DB up to date till the time in went down Simon PS update logs have all the SQL statements in them so it should be very simple to recover! -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 16:00 To: [EMAIL PROTECTED] Subject: backup/restore of mysql Hi, I've posted this question before, and some were kind enough to respond with suggestions to my question [replication], but I'm looking for something more difinitave. Background: I'm running a production mysql database/php4/Apache on a NT4 IBM Netfinity server [3500 records, growing by 100 a day or so]. I do not have the option to go to lunux/unix [company's call not mine]. I am backing up the database twice a day, noon and 6 pm. Question: if a disk should crash, I can recover the database from the last tape backup, but not the transactions that took place in between. Is replacation of the database on another box my only option? Dosn't mysql support transaction logging like MSSQL or Oricle, or Postgres?. I don't wan't to switch to another database, but as this one grows, it's becoming incrisingly important to be able to do a complete database recovery in the event of a crash. Kindest thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: backup/restore of mysql
Greg Cope wrote: Pete Kuczynski wrote: Hi, I've posted this question before, and some were kind enough to respond with suggestions to my question [replication], but I'm looking for something more difinitave. Background: I'm running a production mysql database/php4/Apache on a NT4 IBM Netfinity server [3500 records, growing by 100 a day or so]. I do not have the option to go to lunux/unix [company's call not mine]. I am backing up the database twice a day, noon and 6 pm. Question: if a disk should crash, I can recover the database from the last tape backup, but not the transactions that took place in between. Is replacation of the database on another box my only option? Dosn't mysql support transaction logging like MSSQL or Oricle, or Postgres?. Yes it does - look for update log in the manual. But if a disk gets toasted what are you going to do then (with any system) ? I don't wan't to switch to another database, but as this one grows, it's becoming incrisingly important to be able to do a complete database recovery in the event of a crash. Use a proper operating system, with RAID (either hardware or software RAID 1, or 5) Greg Or keep the backups and logs on another device. Kindest thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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 -- Gerald L. Clark [EMAIL PROTECTED] - 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: backup/restore of mysql
You can use update/bin_update logs. Run these logs from the time of the last backup and it should take you DB up to date till the time in went down Simon PS update logs have all the SQL statements in them so it should be very simple to recover! -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 16:00 To: [EMAIL PROTECTED] Subject: backup/restore of mysql Hi, I've posted this question before, and some were kind enough to respond with suggestions to my question [replication], but I'm looking for something more difinitave. Background: I'm running a production mysql database/php4/Apache on a NT4 IBM Netfinity server [3500 records, growing by 100 a day or so]. I do not have the option to go to lunux/unix [company's call not mine]. I am backing up the database twice a day, noon and 6 pm. Question: if a disk should crash, I can recover the database from the last tape backup, but not the transactions that took place in between. Is replacation of the database on another box my only option? Dosn't mysql support transaction logging like MSSQL or Oricle, or Postgres?. I don't wan't to switch to another database, but as this one grows, it's becoming incrisingly important to be able to do a complete database recovery in the event of a crash. Kindest thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: backup/restore of mysql
Very cool. Thaks very much Simon! Pete Simon Green wrote: Hi Pete To emable loffing use the --log option eg --log-update when stating the server... Simon -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 17:51 To: Simon Green Subject: Re: backup/restore of mysql Hi, do I need to generate these logs using the my.ini file on NT. Pete Simon Green wrote: You can use update/bin_update logs. Run these logs from the time of the last backup and it should take you DB up to date till the time in went down Simon PS update logs have all the SQL statements in them so it should be very simple to recover! -Original Message- From: Pete Kuczynski [mailto:[EMAIL PROTECTED]] Sent: 10 July 2001 16:00 To: [EMAIL PROTECTED] Subject: backup/restore of mysql Hi, I've posted this question before, and some were kind enough to respond with suggestions to my question [replication], but I'm looking for something more difinitave. Background: I'm running a production mysql database/php4/Apache on a NT4 IBM Netfinity server [3500 records, growing by 100 a day or so]. I do not have the option to go to lunux/unix [company's call not mine]. I am backing up the database twice a day, noon and 6 pm. Question: if a disk should crash, I can recover the database from the last tape backup, but not the transactions that took place in between. Is replacation of the database on another box my only option? Dosn't mysql support transaction logging like MSSQL or Oricle, or Postgres?. I don't wan't to switch to another database, but as this one grows, it's becoming incrisingly important to be able to do a complete database recovery in the event of a crash. Kindest thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: backup/restore of mysql
Pete Kuczynski wrote: Hi, I've posted this question before, and some were kind enough to respond with suggestions to my question [replication], but I'm looking for something more difinitave. Background: I'm running a production mysql database/php4/Apache on a NT4 IBM Netfinity server [3500 records, growing by 100 a day or so]. I do not have the option to go to lunux/unix [company's call not mine]. I am backing up the database twice a day, noon and 6 pm. Question: if a disk should crash, I can recover the database from the last tape backup, but not the transactions that took place in between. Is replacation of the database on another box my only option? Dosn't mysql support transaction logging like MSSQL or Oricle, or Postgres?. Yes it does - look for update log in the manual. But if a disk gets toasted what are you going to do then (with any system) ? I don't wan't to switch to another database, but as this one grows, it's becoming incrisingly important to be able to do a complete database recovery in the event of a crash. Use a proper operating system, with RAID (either hardware or software RAID 1, or 5) Greg Kindest thanks! Pete -- ___ Pete Kuczynski Sr. Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: BACKUP/RESTORE speed and delayed index creation.
Hi! At 05:44 PM 6/1/01 +0400, you wrote: Hello mysql, Today I played a little bit with two different ways of backup - first one is to use BACKUP TABLE (which works for myisam only) and the second one is SAVE DATA/LOAD DATA. In both cases if I'm not mistaken the file is wrote by mysqld server so there is no communication overhead. The table was about 3mil of rows 250MB in size, has 2 indexes. So the speeds are: BACKUP TABLE: backup: 26sec restore: 3min.15sec SAVE DATA/LOAD DATA dump: 4.5min restore: 40min Then I tried to drop all indexes from the table and tried to do restore again it went in: 31min The output from backup was 250MB, save file - 400MB. These speeds was really strange for me, I did't expect so huge difference in speads, as I don't see there it should get from. The save data outfile operation should be quite fast as the speed of text parsing should be the real limit, also the really surprising was so slow speed of import data from text, even with no indexes on the table if we would look at the speed it's only about 1000 rows per second which is quite slow. The speed 1000 rows per second is really too little. I tried an InnoDB table with 1 000 000 rows, with 2 integer columns, on the first column a primary key. mysql select * from t25 into outfile 'testout2'; Query OK, 100 rows affected (4.47 sec) mysql load data infile 'testout2' into table t30; Query OK, 100 rows affected (22.23 sec) Records: 100 Deleted: 0 Skipped: 0 Warnings: 0 Thus for these small rows it is 45 000 rows/second on Linux-2.4 2-CPU Xeon 450 Mhz. What is your table definition like? What is the OS and file system? Regards, Heikki -- Best regards, Peter mailto:[EMAIL PROTECTED] - 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