Topic on Project:Support desk

[RESOLVED] mysql error 1064 when run update.php (Syntax error near TYPE=InnoDB)

5
93.215.195.126 (talkcontribs)

Hello,

I try to update my mediawiki from Version 1.11.2 to Version 1.15.5. When I run update.php I get following error:

Creating protected_titles table...Es gab einen Syntaxfehler in der Datenbankabfrage.
Die letzte Datenbankabfrage lautete: „CREATE TABLE `protected_titles` (
 pt_namespace int NOT NULL,
 pt_title varchar(255) binary NOT NULL,
 pt_user int unsigned NOT NULL,
 pt_reason tinyblob,
 pt_timestamp binary(14) NOT NULL,
 pt_expiry varbinary(14) NOT NULL default '',
 pt_create_perm varbinary(60) NOT NULL,
 PRIMARY KEY (pt_namespace,pt_title),
 KEY pt_timestamp (pt_timestamp)
 ) TYPE=InnoDB
“ aus der Funktion „<tt>Database::sourceStream</tt>“.
Die Datenbank meldete den Fehler: „<tt>1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=InnoDB' at line 11 (carl.springfield)</tt>“.

I use MySQL 5.5.32 now, before it was MySQL 5.0. I hope you can help me with this issue.

Thanks imker25

93.215.195.126 (talkcontribs)

Hello again,

I resolved this issue myself. I did the migration again. But now I first updated the wiki from Version 1.11.2 to Version 1.15.5. But I keep the version of the data base Server on MySQL 5.0. Now it was possible to run update.php without errors. After that I updated my database server from MySQL 5.0 to MySQL 5.5.32. And well now it works fine again.

Maybe here the story how I run into the problem. I tryed to migrate a mediawiki installation from ubuntu 8.04 to an ubunutu 12.04 box.

So what I basicly did to slove my issue was migrating the wikidatabse two times. I temprary installed an ubuntu 10.04 box and migrated the wiki and the database to this installation. On the temp 10.04 box update.php went fine. and then I migrated the database to the 12.04 box. Since ubunutu 10.04 and 12.04 uses the same version of mediawiki (1.15) but different MySQL the wiki now works fine on the ubuntu 12.04 box wihtout any issues.

88.130.73.17 (talkcontribs)

Hi,

that's already an improvement. :-)

However, you should note that MediaWiki 1.15 itself already is no longer supported. You should upgrade MediaWiki to version 1.21! See Upgrade for more information!

Valentijn (talkcontribs)

The error is the result of the option $wgDBTableOptions = "TYPE=InnoDB"; in LocalSettings.php. In MySQL, "TYPE=" has been depreciated for "ENGINE=" for a while now and newer MySQL servers simply don't understand "type=" anymore. Changing this to "ENGINE=" will probably fix your issue.

Reply to "[RESOLVED] mysql error 1064 when run update.php (Syntax error near TYPE=InnoDB)"