Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Databasing
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 10-05-2009, 09:29 AM
  #1
loverboy420
Aspirant (Level 2)
 
Join Date: Oct 2009
Posts: 19
iTrader: (0)
loverboy420 is an unknown quantity at this point
Unhappy Cant Import DATABASE of smf

hi!
I am using SMF, and trying to download the database from one hosts and trying to import it to another host...
but when i upload (import) my database it shows the following error :-

Error

SQL query:

# # Dumping data in `smf_log_search_subjects` # INSERT INTO `smf_log_search_subjects` (`word`, `ID_TOPIC`) VALUES (0, 16), (0, 21), (0, 26), (0, 42), (0, 114), (0, 156), (0, 161), (0, 225), (0, 259), (0, 260), (0, 302), (0, 317), (0, 328), (0, 329), (0, 341), (0, 390), (0, 391), (0, 398), (0, 405), (0, 406), (0, 418), (01, 23), (01, 360), (02, 19), (02, 358), (02, 359), (02, 383), (02, 396), (02, 397), (04, 239), (07, 41), (07, 335), (07, 336), (08, 531), (09, 14), (09, 314), (1, 14), (1, 19), (1, 78), (1, 114), (1, 158), (1, 167), (1, 170), (1, 238), (1, 255), (1, 315), (1, 360), (1, 401), (1, 532), (10, 158), (10, 182), (10, 183), (11, 198), (11, 201), (12, 253), (15, 225), (153, 109), (153, 110), (15650, 390), (17, 22), (17, 320), (180, 360), (1944, 384), (2, 12), (2, 16), (2, 26), (2, 80), (2, 109), (2, 110), (2, 128), (2, 147), ([...]

MySQL said: Documentation
#1062 - Duplicate entry '1-360' for key 'PRIMARY'



PLZ HELP! URGENT! VERY SAD
loverboy420 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-05-2009, 10:14 AM
  #2
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
01 and 1 are colliding.
Your inserting integers where integer 01 and 1 are the same.
Can we see the table structure?
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-06-2009, 11:51 AM
  #3
loverboy420
Aspirant (Level 2)
 
Join Date: Oct 2009
Posts: 19
iTrader: (0)
loverboy420 is an unknown quantity at this point
Question

PLz tell clearly...
I am a novice in it
loverboy420 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-06-2009, 12:58 PM
  #4
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
You are inserting duplicate values.
Has the database table structure been changed?
Quote:
show create table smf_log_search_subjects
Can you run that sql query and pass the results here?

Basically the table structure don't support values your trying to insert.
It's guessing what those values could be and then changing them, but in the process the changed value to be inserted already exists in that table.
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-07-2009, 04:13 AM
  #5
bojanski
Novice (Level 1)
 
Join Date: Oct 2009
Posts: 3
iTrader: (0)
bojanski is an unknown quantity at this point
I have the same issue, the case is following:

SMF forum here too, moving from one hosting server to another, in wish to maintain everything i had in the old forum.

Now, SMF doesn't have any inside restoring capability, so it has to be done manually via PhpMyAdmin.

I made a DB backup via SMF admin panel, which saves the table structure, table data and compresses it in gzip.

When restoring the DB on new server, i get the same message. This happens even when just importing into existing fresh install SMF installed DB and making a new DB manually.

There isn't much to alternate here, the encoding is the same in both cases, don't see where i can modify anything else when backing up/restoring.

Still looking for the fault, this is bugging me for a quite while.

Thank you for your reply,
bojanski
bojanski is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-07-2009, 05:35 AM
  #6
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
give me the table description of the smf_log_search_subjects-table before the dump and from the dump file.
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-07-2009, 06:03 AM
  #7
bojanski
Novice (Level 1)
 
Join Date: Oct 2009
Posts: 3
iTrader: (0)
bojanski is an unknown quantity at this point
This is the table structure in the backup file:

Code:
#
# Table structure for table `smf_log_search_subjects`
#

DROP TABLE IF EXISTS `smf_log_search_subjects`;

CREATE TABLE `smf_log_search_subjects` (
  word varchar(20) NOT NULL default '',
  ID_TOPIC mediumint(8) unsigned NOT NULL default 0,
  PRIMARY KEY (word, ID_TOPIC),
  KEY ID_TOPIC (ID_TOPIC)
) TYPE=MyISAM;
This is the table structure after the dump:

Code:
--
-- Table structure for table `smf_log_search_subjects`
--

CREATE TABLE IF NOT EXISTS `smf_log_search_subjects` (
  `word` varchar(20) collate utf8_unicode_ci NOT NULL default '',
  `ID_TOPIC` mediumint(8) unsigned NOT NULL default '0',
  PRIMARY KEY  (`word`,`ID_TOPIC`),
  KEY `ID_TOPIC` (`ID_TOPIC`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
bojanski is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-07-2009, 06:22 AM
  #8
loverboy420
Aspirant (Level 2)
 
Join Date: Oct 2009
Posts: 19
iTrader: (0)
loverboy420 is an unknown quantity at this point
Unhappy

What is "smf_log_search_subjects-table".

Plz tell me how to upload the database....?
I am in serious trouble........
loverboy420 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-07-2009, 12:17 PM
  #9
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
basically if there aren't many lines to be inserted into that table easy fix would be to edit the dumpfile and add '' around every value to be inserted to that table, for example:
Quote:
INSERT INTO `smf_log_search_subjects` (`word`, `ID_TOPIC`) VALUES ('0', '16'), ('0', '21'), ('0', '26'), ('0', '42'), ......
I have no clue why phpmyadmin is not enclosing those values inside '' but it should.
Seems to be a bug in (donno what version your running) phpmyadmin.

If you can dump from command line i would suggest it.
Quote:
#mysqldump -u USER -p --databases DATABASE1 DATABASE2>sqldump.sql
where items marked in red are changed according to your settings.

Last edited by Vege : 10-07-2009 at 12:20 PM.
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-07-2009, 04:41 PM
  #10
bojanski
Novice (Level 1)
 
Join Date: Oct 2009
Posts: 3
iTrader: (0)
bojanski is an unknown quantity at this point
I will try the following: deleting that table from the backup file, as it seems not so important, i will post results here.

Thank you for your time, Vege
bojanski is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-08-2009, 12:51 PM
  #11
loverboy420
Aspirant (Level 2)
 
Join Date: Oct 2009
Posts: 19
iTrader: (0)
loverboy420 is an unknown quantity at this point
Question

are you saying to edit some file............

Plz tell me which files to edit....?
loverboy420 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-08-2009, 01:01 PM
  #12
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
loverboy, you need to edit the dump file that you created from your tables according to what i said earlier.

You need to fix that insert error.
Can you do basic MySQL commands?
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-08-2009, 09:56 PM
  #13
AldrinStep
Novice (Level 1)
 
Join Date: Oct 2009
Posts: 1
iTrader: (0)
AldrinStep is an unknown quantity at this point
Thanks Vege.
AldrinStep is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-09-2009, 03:07 AM
  #14
loverboy420
Aspirant (Level 2)
 
Join Date: Oct 2009
Posts: 19
iTrader: (0)
loverboy420 is an unknown quantity at this point
which file, in which format(extention)?
Where is the file located...?
loverboy420 is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-09-2009, 03:42 AM
  #15
Vege
Super Deity (Level 18)
 
Join Date: Sep 2004
Location: Finland
Posts: 3,410
iTrader: (0)
Vege is just really niceVege is just really niceVege is just really niceVege is just really nice
Quote:
I am using SMF, and trying to download the database from one hosts and trying to import it to another host...
but when i upload (import) my database
That is the file in question. Extention is .sql by default.
Vege is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 06:05 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.