Page MenuHomePhabricator

Non-friendly error message if user supplies wrong database password during install
Closed, ResolvedPublic

Description

From support desk: https://www.mediawiki.org/wiki/Thread:Project:Support_desk/Error_when_trying_to_install_MediaWiki_1.20.2

It would appear supplying the wrong password to installer gives a rather ugly error message and plenty of headers already sent warnings. (Note I haven't tried this myself, I'm going solely on the reported error - and the fact its an access denied error. Its possible the situation may be more complicated then a simple wrong db pass.)

The error the user received is:

Warning: Cannot modify header information - headers already sent in C:\xampp\htdocs\wiki\includes\Exception.php on line 269

Warning: Cannot modify header information - headers already sent in C:\xampp\htdocs\wiki\includes\Exception.php on line 270

Warning: Cannot modify header information - headers already sent in C:\xampp\htdocs\wiki\includes\Exception.php on line 229 A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: CREATE DATABASE my_wiki from within function "MysqlInstaller::setupDatabase". Database returned error "1044: Access denied for user @'localhost' to database 'my_wiki' (localhost)". Backtrace:

  1. 0 C:\xampp\htdocs\wiki\includes\db\Database.php(916): DatabaseBase->reportQueryError('Access denied f...', 1044, 'CREATE DATABASE...', 'MysqlInstaller:...', false)
  2. 1 C:\xampp\htdocs\wiki\includes\installer\MysqlInstaller.php(469): DatabaseBase->query('CREATE DATABASE...', 'MysqlInstaller:...')
  3. 2 [internal function]: MysqlInstaller->setupDatabase(Object(MysqlInstaller))
  4. 3 C:\xampp\htdocs\wiki\includes\installer\Installer.php(1454): call_user_func(Array, Object(MysqlInstaller))
  5. 4 C:\xampp\htdocs\wiki\includes\installer\WebInstallerPage.php(1161): Installer->performInstallation(Array, Array)
  6. 5 C:\xampp\htdocs\wiki\includes\installer\WebInstaller.php(269): WebInstaller_Install->execute()
  7. 6 C:\xampp\htdocs\wiki\mw-config\index.php(50): WebInstaller->execute(Array)
  8. 7 C:\xampp\htdocs\wiki\mw-config\index.php(18): wfInstallerMain()
  9. 8 {main}

Version: 1.20.x
Severity: normal
URL: https://www.mediawiki.org/wiki/Thread:Project:Support_desk/Error_when_trying_to_install_MediaWiki_1.20.2

Details

Reference
bz43528

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Normal.Nov 22 2014, 1:13 AM
bzimport set Reference to bz43528.
Bawolff created this task.Dec 31 2012, 1:01 AM

Could not reproduce the bug. However, while attempting to do so, I found that if the username is left out, then the error message, instead of saying something like "Username missing.", says "MySQL 5.0.2 or later is required, you have . "

Adding many blockers of bug 38638 to the list of "easy" bugs, to mark them as candidates for [[mw:Google Code-in]] tasks (gci2013). If you think this bug is not suitable, remove the keyword.

Change 118742 had a related patch set uploaded by Pubudu538:
Error Msg for missing db username when installing

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

Change 118798 had a related patch set uploaded by Pubudu538:
Error Msg for missing db username when installing

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

Change 118742 abandoned by Pubudu538:
Error Msg for missing db username when installing

Reason:
Replaced this patch with another.

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

Change 118798 had a related patch set uploaded by 01tonythomas:
Error Msg for missing db username & password when installing

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

Change 118798 merged by jenkins-bot:
Error Msg for missing db username & password when installing

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