forums › forums › SQLyog › Using SQLyog › Importing A Batch File Error; Tables Already Exist.
- This topic is empty.
-
AuthorPosts
-
-
November 14, 2006 at 6:03 pm #10018boumboMember
Hi,
I am using SQL Yog Enterprise v5.13.
I am trying to transfer data only from one database to another (From different hosts) and I am having trouble Importing a batch file I created with the specific data.
Here is the procedure I am folllowing:
First, I log in as user to the database I want to retrieve the SQL stmts from.
1) Export the SQL stmts: Right click on the Database I want to export data from (i.e. Minaweb) and choose Export Database as SQL Statements.
2) I select the table I want to export (minaweb_minaweb_form) and set up the Export settings as follows:
3) Click on Export
4) Log in to my other host
5) Right-click on the database which I want to import the sql stmt in.
6) Click on Import Batch File, and select the .sql file created earlier. and finally Execute.
At this point I get an error. It seems to try to create tables which I did not specify during the export. Below is the error file content:
Code:Query:
CREATE TABLE `minaweb_avatar` (
`avatar_id` mediumint(8) unsigned NOT NULL auto_increment,
`avatar_file` varchar(30) NOT NULL default '',
`avatar_name` varchar(100) NOT NULL default '',
`avatar_mimetype` varchar(30) NOT NULL default '',
`avatar_created` int(10) NOT NULL default '0',
`avatar_display` tinyint(1) unsigned NOT NULL default '0',
`avatar_weight` smallint(5) unsigned NOT NULL default '0',
`avatar_type` char(1) NOT NULL default '',
PRIMARY KEY (`avatar_id`),
KEY `avatar_type` (`avatar_type`,`avatar_display`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1Error occured at:2006-06-14 16:28:34
Line no.:31
Error Code: 1050 – Table 'minaweb_avatar' already existsQuery:
CREATE TABLE `minaweb_avatar` (
`avatar_id` mediumint(8) unsigned NOT NULL auto_increment,
`avatar_file` varchar(30) NOT NULL default '',
`avatar_name` varchar(100) NOT NULL default '',
`avatar_mimetype` varchar(30) NOT NULL default '',
`avatar_created` int(10) NOT NULL default '0',
`avatar_display` tinyint(1) unsigned NOT NULL default '0',
`avatar_weight` smallint(5) unsigned NOT NULL default '0',
`avatar_type` char(1) NOT NULL default '',
PRIMARY KEY (`avatar_id`),
KEY `avatar_type` (`avatar_type`,`avatar_display`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1Error occured at:2006-06-14 16:45:35
Line no.:31
Error Code: 1050 – Table 'minaweb_avatar' already existsQuery:
insert into `fungl_auth` (`username`,`password`) values ('admin','02d3a3b1ba1a15f8b623ee50cc29fbd7')Error occured at:2006-11-14 10:42:32
Line no.:17
Error Code: 1046 – No database selectedQuery:
insert into `fungl_auth` (`username`,`password`) values ('admin','02d3a3b1ba1a15f8b623ee50cc29fbd7')Error occured at:2006-11-14 10:43:01
Line no.:17
Error Code: 1146 – Table 'minaweb.fungl_auth' doesn't existQuery:
insert into `fungl_auth` (`username`,`password`) values ('admin','02d3a3b1ba1a15f8b623ee50cc29fbd7')Error occured at:2006-11-14 10:56:01
Line no.:17
Error Code: 1146 – Table 'minaweb.fungl_auth' doesn't existQuery:
insert into `minaweb_minaweb_form` (`form_id`,`page_title`,`form_title`,`mail_title`,`mail_address`,`class_name`,`redirect_url`,`time_redirect`,`sent_msg`,`header_filename`,`template_element_id`,`referal`,`comment`) values (1,'Request Free VIP Pass to VON Spring','Request VON Spring Pass','VON Spring Pass Mailing Campaign','[email protected]','defaultForm','http://www.minacom.com',5,'Thank you for requesting a VIP pass for VON Spring.rnrnWe will be mailing it to you shortly, in time for the show.rnrnPlease be sure to stop by our booth, #236.','testsystems.jpg',887,0,0)Error occured at:2006-11-14 11:55:01
Line no.:17
Error Code: 1062 – Duplicate entry '1' for key 1Query:
insert into `minaweb_minaweb_form` (`form_id`,`page_title`,`form_title`,`mail_title`,`mail_address`,`class_name`,`redirect_url`,`time_redirect`,`sent_msg`,`header_filename`,`template_element_id`,`referal`,`comment`) values (1,'Request Free VIP Pass to VON Spring','Request VON Spring Pass','VON Spring Pass Mailing Campaign','[email protected]','defaultForm','http://www.minacom.com',5,'Thank you for requesting a VIP pass for VON Spring.rnrnWe will be mailing it to you shortly, in time for the show.rnrnPlease be sure to stop by our booth, #236.','testsystems.jpg',887,0,0)Error occured at:2006-11-14 11:56:20
Line no.:17
Error Code: 1062 – Duplicate entry '1' for key 1Query:
insert into `minaweb_minaweb_form` (`form_id`,`page_title`,`form_title`,`mail_title`,`mail_address`,`class_name`,`redirect_url`,`time_redirect`,`sent_msg`,`header_filename`,`template_element_id`,`referal`,`comment`) values (1,'Request Free VIP Pass to VON Spring','Request VON Spring Pass','VON Spring Pass Mailing Campaign','[email protected]','defaultForm','http://www.minacom.com',5,'Thank you for requesting a VIP pass for VON Spring.rnrnWe will be mailing it to you shortly, in time for the show.rnrnPlease be sure to stop by our booth, #236.','testsystems.jpg',887,0,0)Error occured at:2006-11-14 11:58:40
Line no.:17
Error Code: 1062 – Duplicate entry '1' for key 1Query:
insert into `minaweb_minaweb_form` (`form_id`,`page_title`,`form_title`,`mail_title`,`mail_address`,`class_name`,`redirect_url`,`time_redirect`,`sent_msg`,`header_filename`,`template_element_id`,`referal`,`comment`) values (1,'Request Free VIP Pass to VON Spring','Request VON Spring Pass','VON Spring Pass Mailing Campaign','[email protected]','defaultForm','http://www.minacom.com',5,'Thank you for requesting a VIP pass for VON Spring.rnrnWe will be mailing it to you shortly, in time for the show.rnrnPlease be sure to stop by our booth, #236.','testsystems.jpg',887,0,0)Error occured at:2006-11-14 12:01:58
Line no.:17
Error Code: 1062 – Duplicate entry '1' for key 1Query:
insert into `minaweb_minaweb_form` (`form_id`,`page_title`,`form_title`,`mail_title`,`mail_address`,`class_name`,`redirect_url`,`time_redirect`,`sent_msg`,`header_filename`,`template_element_id`,`referal`,`comment`) values (1,'Request Free VIP Pass to VON Spring','Request VON Spring Pass','VON Spring Pass Mailing Campaign','[email protected]','defaultForm','http://www.minacom.com',5,'Thank you for requesting a VIP pass for VON Spring.rnrnWe will be mailing it to you shortly, in time for the show.rnrnPlease be sure to stop by our booth, #236.','testsystems.jpg',887,0,0)Error occured at:2006-11-14 12:06:05
Line no.:17
Error Code: 1062 – Duplicate entry '1' for key 1Query:
insert into `minaweb_minaweb_form` (`form_id`,`page_title`,`form_title`,`mail_title`,`mail_address`,`class_name`,`redirect_url`,`time_redirect`,`sent_msg`,`header_filename`,`template_element_id`,`referal`,`comment`) values (1,'Request Free VIP Pass to VON Spring','Request VON Spring Pass','VON Spring Pass Mailing Campaign','[email protected]','defaultForm','http://www.minacom.com',5,'Thank you for requesting a VIP pass for VON Spring.rnrnWe will be mailing it to you shortly, in time for the show.rnrnPlease be sure to stop by our booth, #236.','testsystems.jpg',887,0,0)Error occured at:2006-11-14 12:59:16
Line no.:17
Error Code: 1062 – Duplicate entry '1' for key 1Do I have to drop the table first before importing the new one in?
I am relatively beginner to Mysql and the software.
Anyone's help would be appreciated.
Thanks.
-
November 15, 2006 at 5:00 am #22916peterlaursenParticipant
Basically you should always upgrade when having trouble with an old version!
But this looks pretty strange. Are you sure that you are trying to import the correct file? Ort did you cahnge the database schema in between?
-
-
AuthorPosts
- You must be logged in to reply to this topic.