Page MenuHomePhabricator

Database name reported as invalid during installation
Closed, ResolvedPublic

Description

Author: mark

Description:
When the database name contains a dash ("-"), MediaWiki will refuse to use it, showing the following error message:

Invalid database name "db-name". Use only ASCII letters (a-z, A-Z), numbers (0-9) and underscores (_).

According to mysql's documentation:
http://dev.mysql.com/doc/refman/5.1/en/identifiers.html

There are some restrictions on the characters that may appear in identifiers:

  • No identifier can contain ASCII NUL (0x00).
  • Database, table, and column names should not end with space characters.
  • Before MySQL 5.1.6, database and table names cannot contain “/”, “\”, “.”, or characters that are not permitted in file names.

Basically, dash is not forbidden by MySQL. What's worse, foo`bar\x01baz would be a valid database name.

While I'm not saying MediaWiki should support such non-sense database names (well, in theory it should), accepting the dash during installation could be at least help a bit (especially in cases where database naming scheme is not something we can decide).


Version: 1.18.x
Severity: normal

Details

Reference
bz26348

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:23 PM
bzimport set Reference to bz26348.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 25969 ***