Advertisement:

SMF MySQL Upgrade Problem

Aloittaja Bill.Ramby, kesäkuu 01, 2011, 09:11:34 AP

« edellinen - seuraava »

Bill.Ramby

I am trying to install my SMF database on a newer version of MySQL. I dumped the database from MySQL 5.1.56 and when I do my import to MySQL Mysql 5.5.8 using the MySQL command line or through parts in PHPMyAdmin, I get this error consistently:

LainaaERROR 1062 (23000) at line 156357: Duplicate entry '7-3808' for key 'PRIMARY'

Line 156357 is a simple insert:

LainaaINSERT INTO `smf_log_search_subjects`

Anyone have an idea how to resolve this issue?

Edit: Added MySQL destination version.

kat

Have you tried repairing the database?

Either from the SMF ACP or CPanel?

Bill.Ramby

Yes I did. No joy. I tried just removing that table section from the import just to have it find an incompatibility in another. It's very strange that MySQL would change that much from 5.1 to 5.5.

kat

You have the base backed-up, obviously.

So, this is just me, thinking out loud, OK?

What if you delete both keys and try it, then?

Maybe recreate it?

(I might be talking total bollox, here. It's just what I think I'd try, if I got stuck with that)

Bill.Ramby

I'm actually in the process of duplicating my site on the same host as a subdomain. My plan was to see if I could upgrade SMF to 2.x then port it over to a newer version of MySQL. It was actually going well till I imported the TP tables. <sigh>

Bill.Ramby

Well, I performed the uprade.php and it completed. I now have a new error. The fun just never ends. ;D

LainaaYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1, 78)' at line 3
File: /pathtoforum/testforum/Sources/MessageIndex.php
Line: 103

Line 103 is:

LainaaVALUES ($modSettings[maxMsgID], $ID_MEMBER, $board)", __FILE__, __LINE__);


Bill.Ramby

Hello, I'm back again. I've got the original error again. A little background. I just moved my website so am trying to restore my database. I cannot upgrade and do not have phpmyadmin. I do have the mysql command line.

Here is the error I am receiving when importing the database (again).

ERROR 1062 (23000) at line 187905: Duplicate entry '7-3808' for key 1

Line 187905 is:

INSERT INTO `smf_log_search_subjects`

Since an upgrade is not an option at this point (site is completely down) any help getting around this issue quickly would be appreciated.

Bill.Ramby

Fixed. Went into the db from the original host and exported the log_searches separately then imported that table via mysql command line. Imported with no problems. Go figure.

Advertisement: