+ Reply to Thread
Results 1 to 9 of 9

Thread: Database error at Install / Upgrade CMS when upgrading from 3.8.4 to 4.0.5

  1. #1

    Exclamation Database error at Install / Upgrade CMS when upgrading from 3.8.4 to 4.0.5

    I got this following error message at http://[path-to-forum]/install/finalupgrade.php?step=6:
    --------------------------------------------------------

    Database error in vBulletin 4.0.5:
    Invalid SQL:
    ALTER TABLE cms_widget DROP INDEX title, ADD INDEX title(title);
    MySQL Error : Table '[database-name].cms_widget' doesn't exist
    Error Number : 1146
    Request Date : [hidden]
    Error Date : [hidden]
    Script : http://[path-to-forum]/install/finalupgrade.php?step=6
    Referrer : http://[path-to-forum]/install/finalupgrade.php?step=5
    IP Address : [hidden]
    Username :
    Classname : vB_Database
    MySQL Version : 5.0.91-community
    --------------------------------------------------------
    May anyone help me to get through this problem? I tried to post in the Tracker but there is no response for days.

  2. #2
    vBulletin Team Trevor Hannant is just really nice Trevor Hannant is just really nice Trevor Hannant is just really nice Trevor Hannant is just really nice Trevor Hannant is just really nice Trevor Hannant's Avatar
    Join Date
    Jul 2002
    Location
    Edinburgh, Scotland
    Age
    38
    Posts
    8,130
    Something has gone wrong in an earlier step of the upgrade process as the cms_widget table should have been added.

    If you have a backup of your database from immediately before the upgrade, try restoring this to a new database, update the config.php file and re-run the upgrade script from scratch checking for any strange/error messages as you're running through, particularly at the step where the CMS is installed in the first place.
    1 - If you're going to upgrade your live site - BACKUP YOUR DATABASE FIRST!!
    2 - If you need to restore an old database - create a new one and restore to there

    TEST IT FIRST! See this article on how to setup a test site

    ** PMs asking me for support will be deleted unless I've asked you to PM me with additional details **

    Been to Scotland - come tell us about it...

  3. #3
    I roll-back the database, start the upgrade from scratch (after add line define('DISABLE_HOOKS', 1); in config.php), and get stuck at Step 5) Install/Upgrade Blog:

    ---------------------------------------------------------
    Database error in vBulletin 4.0.5:

    Invalid SQL:

    CREATE TABLE blog_categorypermission (
    categorypermissionid INT UNSIGNED NOT NULL AUTO_INCREMENT,
    blogcategoryid INT UNSIGNED NOT NULL DEFAULT '0',
    usergroupid INT UNSIGNED NOT NULL DEFAULT '0',
    categorypermissions INT UNSIGNED NOT NULL DEFAULT '0',
    PRIMARY KEY (categorypermissionid),
    UNIQUE KEY usergroupid (usergroupid, blogcategoryid),
    KEY blogcategoryid (blogcategoryid)
    );

    MySQL Error : Table 'blog_categorypermission' already exists
    Error Number : 1050
    Request Date : [hidden]
    Error Date : [hidden]
    Script : http://[path-to-forum]/install/finalupgrade.php?step=5
    Referrer : http://[path-to-forum]/install/finalupgrade.php?step=4&startat=60
    IP Address : [hidden]
    Username :
    Classname : vB_Database
    MySQL Version : 5.1.48
    ---------------------------------------------------------

    Why do I get through this step at first (don't touch into config.php and get stuck Step 6 as noted above), but not this times?

    For more information, I've tried to install Blog engine in prior version 3.8.4. How does the upgrade engine work and how to solve my problem here? Is there any automatic selecting process of install and upgrade?

    Hope to hear from you very soon.

  4. #4
    vBulletin Team Trevor Hannant is just really nice Trevor Hannant is just really nice Trevor Hannant is just really nice Trevor Hannant is just really nice Trevor Hannant is just really nice Trevor Hannant's Avatar
    Join Date
    Jul 2002
    Location
    Edinburgh, Scotland
    Age
    38
    Posts
    8,130
    Did you restore your backup to the same database? Did you DROP all tables before restoring?

    If the answers are 'yes' and 'no' to the above then that's your problem! Backups that include 'DROP' commands only include that command for the table it's backing up. Any new tables created by vB4 will not be dropped and will be left in the database. When you then come to upgrade to vB4 and it tries to add them, you get the 'already exists' message.

    As I said previously, try restoring this to a new database, update the config.php file and re-run the upgrade script from scratch checking for any strange/error messages as you're running through, particularly at the step where the CMS is installed in the first place.
    1 - If you're going to upgrade your live site - BACKUP YOUR DATABASE FIRST!!
    2 - If you need to restore an old database - create a new one and restore to there

    TEST IT FIRST! See this article on how to setup a test site

    ** PMs asking me for support will be deleted unless I've asked you to PM me with additional details **

    Been to Scotland - come tell us about it...

  5. #5
    How does it happen if I installed the Blog product of vBulletin before? Will the upgrade script automatically define if the Blog product is exist or not to install the new one or do the upgrade?

    Thanks for your response.

  6. #6
    It takes so long for the response. May any member of support team help me to get through this problem?

    Our board is in downtime and it's really an urgent case.

  7. #7
    One more day comes through in silence. Where are you, Trevor Hannant?

  8. #8
    That error is because probably your database backup copy is made without the DROP TABLE IF EXISTS `table_name`; command and when you attempted to restore the database, you did not drop the db tables first. If you had that command line, it would have done that automatically.

  9. #9

    Unhappy

    After lots of efforts, the error still appears at the step 6 of final-upgrade session.

    I tried to drop current database and restore data to a new created one.

    I tried to run upgrade script on the fresh upload folder of VBB standard zip.

    The upgrade script also runs well without any error but there is no step concerned about CMS.

    I really don't know what I should do now, and actually, I feel a little bit disappointed about VBB product (and support team!?). There was great and comfortable VBB product without any unreasonable crash and this version 4.x seems to stop that legend.

    May anyone help me out?

+ Reply to Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts