Announcement

Collapse
No announcement yet.

MySQL error on Crashed Site

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

  • Steve Machol
    replied
    Your thread table is crashed. Upload repair.php (it's in the 'extras' folder of the zip file) to your admin directory. Close your forums, then run it from your browser with this syntax:

    http://www.yourdomain.com/forum/admin/repair.php?html=1&check=1

    [Of course change the exact URL as appropriate for your forums.]

    If everything reports 'Ok' then reopen your forums. If not, then run it again. The second time everything should report Ok. See if this fixes the problem.

    Leave a comment:


  • sim
    replied
    Actually - it was just a corrupt table... repaired now and operational again. Thanks

    Leave a comment:


  • sim
    replied
    Okay - I am experiencing exactly the same issue originally reported in this thread after our database crashed this afternoon. Naturally the affected pages are different with ours though.

    Strange thing is that the database came up again several hours ago, but the errors only just started flooding in ! It's as if my host changed something on the server - will check now !!

    Any hints would be useful.

    Database error in vBulletin 2.2.9:
    Invalid SQL: SELECT COUNT(*) AS threads FROM thread

    WHERE thread.visible=1 AND 1=1 AND NOT (thread.forumid='1' OR thread.forumid='2' OR thread.forumid='27' OR thread.forumid='32' OR thread.forumid='25' OR thread.forumid='29' OR thread.forumid='4' OR thread.forumid='30') AND thread.lastpost>=1049174108 AND thread.open<>10
    mysql error: Got error 127 from table handler
    mysql error number: 1030
    Database error in vBulletin 2.2.9:
    Invalid SQL:
    SELECT

    thread.threadid
    FROM thread
    WHERE thread.forumid = 10
    AND thread.sticky=0
    AND thread.visible=1
    AND sticky=0

    ORDER BY sticky DESC, lastpost DESC
    LIMIT 0,25
    mysql error: Got error 127 from table handler
    mysql error number: 1030

    Leave a comment:


  • Scott MacVicar
    replied
    I re-wrote your phpinclude template so it didn't use chat_activity.php and used the vBulletin functions.

    It appears the thread entries have no corresponding post entries. Lost during corruption?

    SELECT * FROM thread LEFT JOIN post ON (post.threadid=thread.threadid) WHERE post.threadid IS NULL

    shows that there are 44 corrupted threads. You would need to install a backup on another database and extract the missing posts from the backup if they are still there.

    Leave a comment:


  • ManagerJosh
    replied
    well if you reimported, you could try updating your forums information in the admin cp.

    ACP --> Update Counters..


    Usually an import may leave lingering threads and/or broken links.

    Hopefully this will solve something


    Also, I got this error when visiting that page.
    Warning: MySQL: Unable to save result set in /hsphere/local/home/survivor/boards.survivoraddicts.com/admin/db_mysql.php on line 93
    Last edited by ManagerJosh; Sun 30th Mar '03, 12:00am.

    Leave a comment:


  • Cygnus
    replied
    OK... this is odd...

    I repaired everything and it all showed status OK.

    I went to the main page. Fine.

    I went into one forum. No problem.

    Looked at a thread. No problem.

    Went back to main page. No problem.

    Went into a different forum. No problem.

    Click on the top thread. Error:

    Database error in vBulletin 2.2.8:
    Invalid SQL: SELECT COUNT(*) AS posts FROM post WHERE post.threadid='9284' AND post.visible=1
    mysql error: Can't find record in 'post'
    mysql error number: 1032
    Date: Saturday 29th of March 2003 11:32:17 PM
    Script: http://boards.survivoraddicts.com/sh...&threadid=9284
    Referer: http://boards.survivoraddicts.com/fo...?s=&forumid=40

    So I go into phpMyAdmin and look at this post with threadid='9284'. Everything looks normal.

    All other threads and posts work, it seems. That one doesn't.

    Thoughts?

    Leave a comment:


  • ManagerJosh
    replied
    I'm not sure if there is a repair function, but might as well select them all and repair.

    Leave a comment:


  • Cygnus
    replied
    2.2.4

    I am running the repair and it is working. I just repaired sessions and it started working. I have been able to post but I am running into other database errors. I will repair again and post all errors I get.

    Leave a comment:


  • ManagerJosh
    replied
    what version of phpmyadmin are u using? If you have at least 2.3, I think you should just login, click select all for the tables, and click repair. See if that helps any.

    Leave a comment:


  • Cygnus
    replied
    Ah... and anything I try to do in phpMyAdmin with the sessions table results in this error in phpMyAdmin:

    Can't open file: 'session.MYD'. (errno: 145)

    I thought about dropping the table and then rebuilding it but not sure about potential pitfalls. Anyone?

    Leave a comment:


  • Cygnus
    replied
    OK... got it working as I posted above... but the db was backed up to an earlier time.

    So... I restored the most recent and we are back to square one. Now I cannot get any response from anything that has to connect to the MySQL server. Everything is the same vague error:

    There seems to have been a slight problem with the SurvivorAddicts.com database.
    Please try again by pressing the refresh button in your browser.
    An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.
    We apologise for any inconvenience.


    I checked via phpMyAdmin and the session table says that it is "in use". We were at this point earlier and somehow got past it. I do not remember for the life of me how we did this.

    Any thoughts?

    Steve, I will PM you username and password info.
    Last edited by Cygnus; Sat 29th Mar '03, 11:04pm.

    Leave a comment:


  • ManagerJosh
    replied
    Sam, if you can't include that file to show who is chatting, my advice is you check over at http://www.vbulletin.org

    They have quite a few codehacks that utilize phpmychat.

    I'm sure you'll find one that will work for you.

    Leave a comment:


  • Cygnus
    replied
    Originally posted by Scott MacVicar
    just downloaded
    phpMyChat
    open connected_users.lib.php and remove
    PHP Code:
     $DbLink->Close(); 
    that should stop it from closing your database connection.
    OK... I deleted the contents of phpinclude and the site came back.

    I then put it back... and deleted $DbLink->Close(); from the connected_users.lib.php and the errors returned.

    The good news is, my users can use the board again.

    The bad news is, I can't include that file to show people who is chatting.

    Any idea what I can do here, Scott? I am VERY grateful for your help so far.

    -Sam

    Leave a comment:


  • Scott MacVicar
    replied
    just downloaded
    phpMyChat
    open connected_users.lib.php and remove
    PHP Code:
     $DbLink->Close(); 
    that should stop it from closing your database connection.

    Leave a comment:


  • Scott MacVicar
    replied
    ok just to test remove all the contents of the phpinclude template and try that.

    Leave a comment:

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