Announcement

Collapse
No announcement yet.

How to drop and create the attachmentviews table?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to drop and create the attachmentviews table?

    I'm receiving MySQL database errors:

    Code:
    Can't find file: 'attachmentviews'
    I tried backing up the database and received the following error:

    Code:
    mysqldump error output: mysqldump: Got error: 1017: Can't find file: 'attachmentviews' (errno: 2) when using LOCK TABLES
    I went through the ACP and tried to Repair/Optimize the table, however it produced an error:

    Code:
    Error: Can't find file: 'attachmentviews' (errno: 2)
    I performed the following MySQL query:

    Code:
    DROP IF EXISTS attachmentviews;
    CREATE TABLE attachmentviews (
    attachmentid INT UNSIGNED NOT NULL DEFAULT '0',
    KEY postid (attachmentid)
    )
    And received this error:

    Code:
    An error occurred while attempting to execute your query. The following information was returned. 
    
    error number: 1064 
    
    error desc: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS attachmentviews;
    CREATE TABLE attachmentviews (
    attachmentid INT UNS' at line 1
    How can I solve this?

    Running vBulletin 4.2.0 PL3 and MySQL 5.1.60

    Thanks in advance.
    PNW Moto

  • #2
    A better solution would be to have your hosting company recover the table from a backup.

    Run this query
    drop attachmentsviews;

    The code to recreate it is in the /install/mysql-schema.php file. Search for attachmentviews.

    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    X