Announcement

Collapse
No announcement yet.

Database Error, Invalid SQL

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

  • matrlx
    replied
    Good stuff, that did the trick. All tables are "OK" now according to the nifty little repair module

    thanks again!

    Leave a comment:


  • Steve Machol
    replied
    It is in the includes directory.

    Leave a comment:


  • matrlx
    replied
    Hmm

    I can't find the config.php file in my vbulletin folder. Can you give me its path please? Or you are you referring to a different config file?

    //matrlx

    Leave a comment:


  • Steve Machol
    replied
    You can run queries in phpMyAdmin. To run queries you first need to give yourself permission to run queries in the Admin CP. To do this, edit this section of config.php:

    // ****** USERS WITH QUERY RUNNING PERMISSIONS ******
    // The users specified here will be allowed to run queries from the control panel.
    // See the above entries for more information on the format.
    // Please note that the ability to run queries is quite powerful. You may wish
    // to remove all user IDs from this list for security reasons.
    $canrunqueries = 'x';


    ...with x being your userid number.

    Leave a comment:


  • matrlx
    replied
    I dont have permission to run SQL queries?

    Originally posted by Steve Machol
    You are missing the data file for this table. This seems to happen to the threadviews table along with the attachmentviews table. Run these queries to recreate both of these tables:

    1:
    DROP TABLE IF EXISTS threadviews;

    2:
    CREATE TABLE threadviews (
    threadid INT UNSIGNED NOT NULL DEFAULT '0',
    KEY threadid (threadid)
    );


    3:
    DROP TABLE IF EXISTS attachmentviews;

    4:
    CREATE TABLE attachmentviews (
    attachmentid INT UNSIGNED NOT NULL DEFAULT '0',
    KEY postid (attachmentid)
    );
    How do I allow my server to run SQL queries? And is it done within the server config (I have a dedicated server with FREE BSD and Plesk) or within the VB controlpanel ?

    I got this problem after my mysql DB crashed when my server's HDD space ran out.

    Leave a comment:


  • Gaffer
    replied
    Good that helped me as well.

    Leave a comment:


  • Steve Machol
    replied
    Yes.

    Leave a comment:


  • Al Gregory
    replied
    I lost thread and attachment views too Would an SQL crash cause that to happen?

    Leave a comment:


  • Steve Machol
    replied
    You are missing the data file for this table. This seems to happen to the threadviews table along with the attachmentviews table. Run these queries to recreate both of these tables:

    1:
    DROP TABLE IF EXISTS threadviews;

    2:
    CREATE TABLE threadviews (
    threadid INT UNSIGNED NOT NULL DEFAULT '0',
    KEY threadid (threadid)
    );


    3:
    DROP TABLE IF EXISTS attachmentviews;

    4:
    CREATE TABLE attachmentviews (
    attachmentid INT UNSIGNED NOT NULL DEFAULT '0',
    KEY postid (attachmentid)
    );

    Leave a comment:


  • Jeff Rambo
    replied
    Copy that. Last question, I've ran the repair/optimize tool several times now. It has repaired everything except for this:
    attachmentviews Check Error: Can't find file: 'attachmentviews.MYD' (errno: 2)

    Is there a process I can take to correct that error?

    Leave a comment:


  • Steve Machol
    replied
    Even with the forums turned off, this does not stop people from trying to access them and showing up on the currently active section.

    Leave a comment:


  • Jeff Rambo
    replied
    Originally posted by Steve Machol
    You need to keep running repair until all the tables are fixed. You have a severely corrupted database.

    I also strongly recommend you close your forums until this is done to avoid further problems.
    The forums have been turned off for a few hours, yet the currently active section still shows members logged in. Is this normal?

    Leave a comment:


  • Steve Machol
    replied
    You need to keep running repair until all the tables are fixed. You have a severely corrupted database.

    I also strongly recommend you close your forums until this is done to avoid further problems.

    Leave a comment:


  • Jeff Rambo
    replied
    OK, I did that and aside from several other warnings, these stood out:

    Error: Can't find file: 'attachmentviews.MYD' (errno: 2)
    pm Check Warning: Table is marked as crashed
    pm Check Warning: 4 clients is using or hasn't closed the table properly
    pm Check Warning: Size of datafile is: 1060864 Should be: 1060851
    pm Check Error: Found 62222 keys of 62221
    pm Check Error: Corrupt
    threadviews Check Warning: Table is marked as crashed
    threadviews Check Warning: 2 clients is using or hasn't closed the table properly
    threadviews Check Error: Can't read key from filepos: 1024
    threadviews Check Error: Corrupt
    word Check Warning: Table is marked as crashed
    word Check Warning: 4 clients is using or hasn't closed the table properly
    word Check Warning: Size of datafile is: 22659072 Should be: 22659048
    word Check Error: Found 419613 keys of 419612
    word Check Error: Corrupt

    What now?

    Leave a comment:


  • Steve Machol
    replied
    MySQL error: 145 = Table was marked as crashed and should be repaired

    Your pm table crashed. To fix it, run Repair/Optimize in the Admin CP. You may need to run it more than once to fix all errors:

    Admin CP -> Import & Maintenance -> Repair/Optimize Tables -> Check All -> Continue

    Leave a comment:

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