Page MenuHomePhabricator

Installation/ Upgrade impossible when database name contains hyphen
Closed, ResolvedPublic

Description

Author: accnospamtom

Description:
Some providers use a hyphen as part of the databasenames (e.g. hosteurope.de).

Example: dbxxxx-yyyy

The "dbxxxx-" cannot be changed by the user, it's fixed.

The mediawiki installation script breaks with an error (invalid database name).

In my case, an older mediawiki-database exists, but cannot be upgraded with the new installer, clean install won't work either.


Version: 1.17.x
Severity: blocker

Details

Reference
bz25969

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:23 PM
bzimport set Reference to bz25969.
bzimport added a subscriber: Unknown Object (MLST).

accnospamtom wrote:

the regexp in "/includes/installer/MysqlInstaller.php"

line 79: <code>} elseif ( !preg_match( '/^[a-zA-Z0-9_]+$/', $newValues['wgDBname'] ) ) {</code>

should allow "-" as part of wgDMname

  • Bug 26348 has been marked as a duplicate of this bug. ***

The error message would also need to be changed. So really need to check and see whether Postgres will also allow that character