News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

BACKUP Database problem

Started by Ricky000, July 17, 2014, 01:31:58 AM

Previous topic - Next topic

Ricky000

Hello;

I have search around the forum and couldn't find any solution for my problem i have had a few errors before and i was able to fix them... I am uploading my OLD SMF database to a new hosting and i am getting this error...


QuoteSQL query:

CREATE TABLE `smf_sessions` (
session_idchar( 32 ) NOT NULL default '',
last_update int( 10 ) unsigned NOT NULL default '',
data text NOT NULL default '',
PRIMARY KEY ( session_id )
) ENGINE = MYISAM ;

MySQL said: Documentation
#1067 - Invalid default value for 'last_update'

Please if some one can help me ... just to let you know i was using Arabic language pack for my old SMF and i will now as well...
PLEASE HELP thanks

Justyne

#1
Looks like broken SQL syntax to me if this is mySQL as you say.

How did you manage to make this backup?

CREATE TABLE `smf__sessions` (
  `session_id` varchar(32) NOT NULL DEFAULT '',
  `last_update` int(10) unsigned NOT NULL DEFAULT '0',
  `data` longtext NOT NULL,
  PRIMARY KEY (`session_id`)
) ENGINE=MyISAM;



Edit: Actually, that was a shoddy answer on my part. Can you tell us what MySQL version you were on at your old host and which one you will be on at your new host.

Also, which version of SMF?
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Ricky000

the new mySql version is 5.5.37-35.1-log i don't know the old one because the hosting is deleted my smf version is 1.1.8 i uploaded a fresh copy of the same version to my new hosting also i backed up the database using smf maintenance tab

thanks

Arantor

I'm extremely curious about this backup.

Firstly, there's no way it was produced by 1.1.8. 1.1.18 perhaps but not 1.1.8 since prior to 1.1.12 the backup only ever issued TYPE= not ENGINE= declarations.

I just did a similar backup from a 1.1.19 installation I have laying around (and I know that between 1.1.8 and 1.1.19 only 1.1.12 changed the backup, and it wouldn't have affected anything other than TYPE= vs ENGINE= in this case) and it gives me:

CREATE TABLE `smf_sessions` (
  session_id char(32) NOT NULL,
  last_update int(10) unsigned NOT NULL,
  data text NOT NULL,
  PRIMARY KEY (session_id)
) ENGINE=MyISAM;


I have no idea why you have a space missing or why your backup is otherwise damaged... strange that.

Ricky000

I changed  TYPE= to ENGINE declarations because i couldn't import my database through phpMYAdmin because it wasn't supported i read over the internet and i was told to change it...

Arantor

Nice of you to tell us that. Anything else you changed manually?

Ricky000

Im sorry not to mention it i have also fixed my smf_log_search_subjects because i had this error at the start

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

i found this line

INSERT INTO `smf_log_search_subjects` (`word`, `ID_TOPIC`) VALUES (0, 16),

selected and removed all until i got to the first:


DROP TABLE IF EXISTS `smf_log_search_topics`;

Only that INSERT and everything after it, up to "DROP" (without "DROP").

thats what i found on smf forum hope its not confusing

Sir Osis of Liver

Quote from: Ricky000 on July 17, 2014, 04:59:10 AM
i backed up the database using smf maintenance tab

If you backed up with the admin db backup feature, the backup may be corrupt.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Ricky000

How can i fix it then please i cant access my old forum due to my old hosting provider is delete any solutions to my problem??

This topic had the same issue as me i followed it but ended up with different error at the end they fixed it for him'
http://www.simplemachines.org/community/index.php?topic=337470.60

Please HELPME

Justyne

that is a different mysql error entirely.

Have you tried the code ‽ gave?
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Ricky000

Thank for your HELP bro now i get this error while importing my database due to it been Arabic language all the posts appears as ?? ?? <<< this question marks i tried importing it as UTF-8 i get all blank any solutions to this PROBLEM please someone HELP thanks

Arantor

Don't import it as UTF-8 because the data isn't in UTF-8.

Import it as ISO-8859-6.

Ricky000

i tried importing it as ISO-8859-6. only 1 table was uploaded smf_attachments ? whats the problem now

Arantor

I don't know, you tell me. What did it say to you?

Ricky000

Nothing no error and no successfull message came up only 1 table was imported

Arantor

Then I don't know what you did because there's more than one table in a backup file. Perhaps you need to remove all the existing tables and reimport fresh.

Ricky000

I dropped all tables and tried again even on a new database and am still getting only 1 table

Justyne

You seem to still be importing to Latin 1 as per screenshot.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Ricky000

sorry for late reply...

I am importing it as ISO-8859-6 but its going through utf as the image shows what will the problem be because it still uploading 1 table.

Justyne

Something is not going right. Look at "collation" on that screenie you attached. It shows UTF-8.

You need that collation to show you ISO-8859-6.

Make sure you do this from scratch. Make a new DB. Open PHP my admin, import your file. Before you click OK make sure you have the right encoding.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Advertisement: