Mediawiki install error: Database returned error "1050: Table 'user' already exists

apps

#1

I used the one-click install for mediawiki (1.19.2). I have tried it multiple times (and with new mysql databases several times). The install seems to time-out on the first attempt, and when I go back to complete the install I get the following error message (fwiw, I’ve changed the site name to “####” for privacy):

Setting up database... done
Creating tables...A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:

    CREATE TABLE `user` ( user_id int unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, user_name varchar(255) binary NOT NULL default '', user_real_name varchar(255) binary NOT NULL default '', user_password tinyblob NOT NULL, user_newpassword tinyblob NOT NULL, user_newpass_time binary(14), user_email tinytext NOT NULL, user_touched binary(14) NOT NULL default '', user_token binary(32) NOT NULL default '', user_email_authenticated binary(14), user_email_token binary(32), user_email_token_expires binary(14), user_registration binary(14), user_editcount int ) ENGINE=InnoDB, DEFAULT CHARSET=binary 

from within function "DatabaseBase::sourceFile( /home/####/####.com/wiki/maintenance/tables.sql )". Database returned error "1050: Table 'user' already exists (mysql.####.com)".

Backtrace:

#0 /home/####/####.com/wiki/includes/db/Database.php(885): DatabaseBase->reportQueryError('Table 'user' al...', 1050, 'CREATE TABLE `u...', 'DatabaseBase::s...', false)
#1 /home/####/####.com/wiki/includes/db/Database.php(3190): DatabaseBase->query('CREATE TABLE `u...', 'DatabaseBase::s...')
#2 /home/####/####.com/wiki/includes/db/Database.php(3102): DatabaseBase->sourceStream(Resource id #69, false, false, 'DatabaseBase::s...')
#3 /home/####/####.com/wiki/includes/installer/DatabaseInstaller.php(169): DatabaseBase->sourceFile('/home/###...')
#4 [internal function]: DatabaseInstaller->createTables(Object(MysqlInstaller))
#5 /home/####/####.com/wiki/includes/installer/Installer.php(1389): call_user_func(Array, Object(MysqlInstaller))
#6 /home/####/####.com/wiki/includes/installer/WebInstallerPage.php(1142): Installer->performInstallation(Array, Array)
#7 /home/####/####.com/wiki/includes/installer/WebInstaller.php(254): WebInstaller_Install->execute()
#8 /home/####/####.com/wiki/mw-config/index.php(50): WebInstaller->execute(Array)
#9 /home/####/####.com/wiki/mw-config/index.php(18): wfInstallerMain()
#10 {main}

Thanks in advance. I appreciate any help anyone might offer, but even if you just know the general issue, I can try my best to google my way toward a more specific solution.

Thanks.


#2

MediaWiki gets pretty confused when you show it a database that’s been partially set up. Clear everything out of the database using phpMyAdmin before you try another install. (You can access phpMyAdmin through your MySQL hostname, e.g. mysql.example.com. Use the same database username and password you were typing into the installer.)


#3

Thanks so much! That flushed out the database and took me back to square one.

Unfortunately, I’m still stuck with the original problem. After I click “install,” the page seems to be loading for quite some time until the following appears:

I’ll try figuring that out, but if you or anyone else has any experience or suggestions, I’m all ears. Thanks again!
[hr]
The error logs that appear when I try to install are:

[error] [client ####] Premature end of script headers: index.php, referer: http://www.####.com/wiki/mw-config/index.php?page=Install

[error] [client ####] File does not exist: /home/####/####.com/internal_error.html, referer: http://www.####.com/wiki/mw-config/index.php?page=Install

(And, fwiw, the following errors are also seem to be cropping up at other times during the day: [error] [client ####] File does not exist: /home/####/####.com/logs; and [error] [client ####] File does not exist: /home/####/####.com/missing.html)

I’ll keep hunting, but any insight is welcome.


#4

What PHP version are you using?


#5

+1, same problem.

PHP 5.3.13