Topic on Project:Support desk

94.2.131.148 (talkcontribs)

hi I get this error when trying to create the tables and setup the wiki

Setting up database... done Creating tables... A database query error has occurred. This may indicate a bug in the software. Query: 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, user_password_expires varbinary(14) DEFAULT NULL ) ENGINE=InnoDB, DEFAULT CHARSET=binary

Function: DatabaseBase::sourceFile( /home/paladox/public_html/en/maintenance/tables.sql ) Error: 1005 Can't create table 'paladox_en.user' (errno: 121) (localhost)

Backtrace:

  1. 0 /home/paladox/public_html/en/includes/db/Database.php(1123): DatabaseBase->reportQueryError('Can't create ta...', 1005, 'CREATE TABLE `u...', 'DatabaseBase::s...', false)
  2. 1 /home/paladox/public_html/en/includes/db/Database.php(3858): DatabaseBase->query('CREATE TABLE `u...', 'DatabaseBase::s...')
  3. 2 /home/paladox/public_html/en/includes/db/Database.php(3772): DatabaseBase->sourceStream(Resource id #85, false, false, 'DatabaseBase::s...', false)
  4. 3 /home/paladox/public_html/en/includes/installer/DatabaseInstaller.php(187): DatabaseBase->sourceFile('/home/paladox/p...')
  5. 4 [internal function]: DatabaseInstaller->createTables(Object(MysqlInstaller))
  6. 5 /home/paladox/public_html/en/includes/installer/Installer.php(1533): call_user_func(Array, Object(MysqlInstaller))
  7. 6 /home/paladox/public_html/en/includes/installer/WebInstallerPage.php(1336): Installer->performInstallation(Array, Array)
  8. 7 /home/paladox/public_html/en/includes/installer/WebInstaller.php(283): WebInstaller_Install->execute()
  9. 8 /home/paladox/public_html/en/mw-config/index.php(63): WebInstaller->execute(Array)
  10. 9 /home/paladox/public_html/en/mw-config/index.php(31): wfInstallerMain()
  11. 10 {main}

Notice: Uncommitted DB writes (transaction from DatabaseInstaller::createTables). in /home/paladox/public_html/en/includes/db/Database.php on line 4147

86.173.52.65 (talkcontribs)

I run Mediawiki 1.23 Wmf 22.

86.173.52.65 (talkcontribs)

And wiki is at http://en.random-wikisaur.tk. I have just used the backup I did before deleting it and tried creating new tables and refresh the wiki. To fix some issues with centralauth.

Ciencia Al Poder (talkcontribs)

That error means the table already exists. But still, MediaWiki failed to properly detect if the table structure was present. Maybe you removed some tables while others were still around?

86.173.52.65 (talkcontribs)

oh ok. but I deleted the tables and tried redoing the setup and create the tables like you would if you have just started to install the wiki.

86.173.52.65 (talkcontribs)

oh ok. but I deleted the tables and tried redoing the setup and create the tables like you would if you have just started to install the wiki.

Ciencia Al Poder (talkcontribs)

So... you solved the issue by creating the tables manually/with the tables.sql script?

86.173.52.65 (talkcontribs)

Well no but I will try to do that at a later date but thanks.

Ciencia Al Poder (talkcontribs)

No. You should either:

  • Instal on a new and clean database (MediaWiki installer can create the database for you, and this is recommended)
  • Import a full backup of the old database if your intention was to restore it.
86.173.52.65 (talkcontribs)

um I would create the tables again and then I would use the back up and import the tables.

Ciencia Al Poder (talkcontribs)

It does not make sense to create the tables first and then overwrite them when importing the backup of the database. Also, the database import may fail if tables already exist, depending if it deletes the tables before importing them or if it tries to import the data on the existing table structure.

86.173.52.65 (talkcontribs)

Ok I have used the table.sql script and I will delete the page table and import it. it seems there is a bug in table.sql because it should be working.

86.173.52.65 (talkcontribs)

I also get this error now

Setting up database... done Creating tables... A database query error has occurred. This may indicate a bug in the software. Query: 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, user_password_expires varbinary(14) DEFAULT NULL ) ENGINE=InnoDB, DEFAULT CHARSET=binary

Function: DatabaseBase::sourceFile( /home/paladox/public_html/en/maintenance/tables.sql ) Error: 1005 Can't create table 'paladox_en.user' (errno: 121) (localhost)

Backtrace:

  1. 0 /home/paladox/public_html/en/includes/db/Database.php(1123): DatabaseBase->reportQueryError('Can't create ta...', 1005, 'CREATE TABLE `u...', 'DatabaseBase::s...', false)
  2. 1 /home/paladox/public_html/en/includes/db/Database.php(3858): DatabaseBase->query('CREATE TABLE `u...', 'DatabaseBase::s...')
  3. 2 /home/paladox/public_html/en/includes/db/Database.php(3772): DatabaseBase->sourceStream(Resource id #85, false, false, 'DatabaseBase::s...', false)
  4. 3 /home/paladox/public_html/en/includes/installer/DatabaseInstaller.php(187): DatabaseBase->sourceFile('/home/paladox/p...')
  5. 4 [internal function]: DatabaseInstaller->createTables(Object(MysqlInstaller))
  6. 5 /home/paladox/public_html/en/includes/installer/Installer.php(1533): call_user_func(Array, Object(MysqlInstaller))
  7. 6 /home/paladox/public_html/en/includes/installer/WebInstallerPage.php(1336): Installer->performInstallation(Array, Array)
  8. 7 /home/paladox/public_html/en/includes/installer/WebInstaller.php(283): WebInstaller_Install->execute()
  9. 8 /home/paladox/public_html/en/mw-config/index.php(63): WebInstaller->execute(Array)
  10. 9 /home/paladox/public_html/en/mw-config/index.php(31): wfInstallerMain()
  11. 10 {main}

Notice: Uncommitted DB writes (transaction from DatabaseInstaller::createTables). in /home/paladox/public_html/en/includes/db/Database.php on line 4147

Ciencia Al Poder (talkcontribs)

Well, this is going to nowhere.

You're having the same error. It's like you haven't learned anything from our explanations.

86.173.52.65 (talkcontribs)

Yes I do what you said to do. But there seams to be bug in table.sql when using the web updater.

Reply to "database help"