Page MenuHomePhabricator

mySQL user lacks "create table" privilege.
Closed, ResolvedPublic

Description

The script maintenance/update.php is used to create missing tables at times, in addition
to many other tasks. The three wiki database mysql users automatically created during
installation do not have the "create table" privilege in the wiki database, thus the
"crate table" SQL command fails, as this console log shows:

...change_tag_rc_tag key already set on change_tag table.
Creating translate_sections table...En dä Syntax vun enem Befähl för de Daatebank es
ene Fähler es opjefalle.
Dä letzte Befähl för de Daatebank es jewäse:
<blockquote><code>CREATE TABLE testwiki_translate_sections (
trs_page int unsigned NOT NULL,
trs_key varchar(255) binary NOT NULL,
trs_text mediumblob NOT NULL,
PRIMARY KEY (trs_page, trs_key),
KEY trs_page (trs_page)
) ENGINE=InnoDB, DEFAULT CHARSET=binary
</code></blockquote>
un kohm us däm Projramm singe Funktion: „<code>DatabaseBase::sourceStream</code>“.
De Datebank meld dä Fähler: „<code>1142: CREATE command denied to user 'wikiuser'@'localhost' for table 'testwiki_translate_sections' (localhost)</code>“.


Version: 1.16.x
Severity: major

Details

Reference
bz20634

Event Timeline

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

You're supposed to set $wgDBadminuser and $wgDBadminpassword in LocalSettings with the info of a user who has these privileges.

ayg wrote:

(In reply to comment #1)

You're supposed to set $wgDBadminuser and $wgDBadminpassword in LocalSettings
with the info of a user who has these privileges.

Why aren't these users also created automatically, and the variables populated? This at least seems like a legitimate feature request. You shouldn't have to manually fiddle with files to get upgrading to work. Frankly, I don't see any serious reason why the normal user couldn't be given full privileges on the database, or certainly stuff like CREATE TABLE and ALTER TABLE.

Fixed in r56285. This won't do anything for existing users, of course.