Page MenuHomePhabricator

WebInstaller: MysqlInstaller incorrectly checks permissions to create database users
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Create a new MySQL (or MariaDB) database, any supported version
  • Create an administrator user with appropriate permissions to create users. For example:
CREATE USER 'wikidbadmin'@'%' ;
GRANT CREATE USER ON *.* TO 'wikidbadmin'@'%' ;
GRANT GRANT OPTION ON `wikidb`.* TO 'wikidbadmin'@'%' ;
GRANT INSERT ON `mysql`.* TO 'wikidbadmin'@'%' ;
  • Download and extract MediaWiki and connect it to a server so pages load
  • Navigate to the index
  • Start the installation
  • When prompted, select to create a new user

What happens?:

Despite having all necessary permissions to create an appropriate user, the installer provides a note that the necessary permissions are missing and does not offer the checkbox to create a new user.

What should have happened instead?:

The installer should have provided a checkbox allowing for creation of a new user.

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

1.43.0

Other information (browser name/version, screenshots, etc.):

Event Timeline

Change #1134358 had a related patch set uploaded (by CtrlZvi; author: CtrlZvi):

[mediawiki/core@master] installer: fix MySQL create user permissions check

https://gerrit.wikimedia.org/r/1134358

Change #1134358 merged by jenkins-bot:

[mediawiki/core@master] installer: fix MySQL create user permissions check

https://gerrit.wikimedia.org/r/1134358

Change #1137382 had a related patch set uploaded (by Krinkle; author: CtrlZvi):

[mediawiki/core@REL1_43] installer: fix MySQL create user permissions check

https://gerrit.wikimedia.org/r/1137382

Change #1137383 had a related patch set uploaded (by Krinkle; author: CtrlZvi):

[mediawiki/core@REL1_42] installer: fix MySQL create user permissions check

https://gerrit.wikimedia.org/r/1137383

Change #1137382 merged by jenkins-bot:

[mediawiki/core@REL1_43] installer: fix MySQL create user permissions check

https://gerrit.wikimedia.org/r/1137382

Change #1137383 merged by jenkins-bot:

[mediawiki/core@REL1_42] installer: fix MySQL create user permissions check

https://gerrit.wikimedia.org/r/1137383

@CtrlZvi Thanks for submitting a patch! Just to confirm, has this issue now been resolved for you?

I believe so. I have been successfully running the installation with the patch for a while now. I don't believe there's a release with it included yet, though, so it is only resolved for me when deploying from a branch instead of a release.