Manual MediaWiki installation

While trying to manually install the latest MediaWiki (1.34.1) I get the following SQL errors:

mw-config/index.php?page=Install Wikimedia\Rdbms\DBQueryError from line 1603 of /home/vol2_6/[username]/htdocs/includes/libs/rdbms/database/Database.php: A database query error has occurred. Did you forget to run your application’s database schema updater after upgrading?

and also:

Function: Wikimedia\Rdbms\Database::sourceFile( /home/vol2_6/[username]/htdocs/maintenance/tables.sql )
Error: 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 ’ DEFAULT CHARSET=binary’ at line 17 (

#0 /home/vol2_6/[username]/htdocs/includes/libs/rdbms/database/Database.php(1574): Wikimedia\Rdbms\Database->getQueryExceptionAndLog(string, integer, string, string)
#1 /home/vol2_6/[username]/htdocs/includes/libs/rdbms/database/Database.php(1152): Wikimedia\Rdbms\Database->reportQueryError(string, integer, string, string, boolean)
#2 /home/vol2_6/[username]/htdocs/includes/libs/rdbms/database/Database.php(4539): Wikimedia\Rdbms\Database->query(string, string)
#3 /home/vol2_6/[username]/htdocs/includes/libs/rdbms/database/Database.php(4474): Wikimedia\Rdbms\Database->sourceStream(resource (closed), NULL, NULL, string, NULL)
#4 /home/vol2_6/[username]/htdocs/includes/installer/DatabaseInstaller.php(228): Wikimedia\Rdbms\Database->sourceFile(string)
#5 /home/vol2_6/[username]/htdocs/includes/installer/DatabaseInstaller.php(251): DatabaseInstaller->stepApplySourceFile(string, string, boolean)
#6 /home/vol2_6/[username]/htdocs/includes/installer/Installer.php(1624): DatabaseInstaller->createTables(MysqlInstaller)
#7 /home/vol2_6/[username]/htdocs/includes/installer/WebInstallerInstall.php(44): Installer->performInstallation(array, array)
#8 /home/vol2_6/[username]/htdocs/includes/installer/WebInstaller.php(270): WebInstallerInstall->execute()
#9 /home/vol2_6/[username]/htdocs/mw-config/index.php(80): WebInstaller->execute(array)
#10 /home/vol2_6/[username]/htdocs/mw-config/index.php(38): wfInstallerMain()
#11 {main}

Is that an issue of the MySQL user’s rights or is it something else?

I haven’t seen this exact error before myself, but judging by some Googling, I think the issue is caused by the lack of InnoDB support on free hosting (which is explained here).

Specifically, the supposedly incorrect MySQL segment seems to originate in this setting: Manual:$wgDBTableOptions - MediaWiki

The default option for this is set in the includes/DefaultSettings.php. I suppose you could replace the ENGINE=InnoDB part with ENGINE=MyISAM in that file, but there might be a better way to accomplish that. Unfortunately, I don’t know enough about MediaWiki to tell you how that would work.

1 Like

Thanks for trying to help!

Editing core files probably isn’t the best way to go, since that means that the changes should be reapplied after every update.

I had previously tried installing the wiki with Softaculous, and that resulted in a successful creation of the tables in the database. I wonder if Softaculous makes anything different, as it installed almost the same version of Mediawiki (1.34.0 instead of 1.34.1 which I tried to install manually).

Softaculous uses it’s own installation process, not the built-in installer, so it might be that since it creates the database tables in a different way, it doesn’t have this issue.

But since it’s available in Softaculous, could you install version 1.34.0 through Softaculous and then upgrade it to 1.34.1 by hand afterwards? That way, you can avoid MediaWiki’s own installer too.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.