Entire board down. please help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • remlle
    Member
    • Oct 2002
    • 79

    Entire board down. please help

    I love the new look and the new forum. problem is seen below. I dont know why it has come up like this. I can get a forum list but nothing else I get this when ever I try to open my threads or move into the individual threads.
    anyone know why? please help me ASAP.
    I think it has somthing to do with with post.myd but I dont know where or what that file is.

    Database error in vBulletin 3.0.0 Gamma:
    Invalid SQL:
    SELECT
    IF(votenum >= 2, votenum, 0) AS votenum,
    IF(votenum >= 2 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
    post.pagetext AS preview,
    thread.threadid, thread.title AS threadtitle, lastpost, thread.forumid, pollid, open, replycount, postusername, postuserid, thread.iconid AS threadiconid,
    lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, notes, thread.visible, sticky, votetotal, thread.attach
    , NOT ISNULL(subscribethread.subscribethreadid) AS issubscribed
    , NOT ISNULL(deletionlog.primaryid) AS isdeleted, deletionlog.userid AS del_userid,
    deletionlog.username AS del_username, deletionlog.reason AS del_reason
    FROM thread AS thread
    LEFT JOIN deletionlog AS deletionlog ON(thread.threadid = deletionlog.primaryid AND type = 'thread')
    LEFT JOIN subscribethread AS subscribethread ON(subscribethread.threadid = thread.threadid AND subscribethread.userid = 874)
    LEFT JOIN post AS post ON(post.postid = thread.firstpostid)
    WHERE thread.threadid IN (0,3175,3178,3172,3177,3160,3165,3163,3161,3139,3164,3151,3155,3045,2959,3060,3030,3047,31 37,3140,3144,3076,3145,3143,3152,3116,3113,3118,3135,3131,3134,3120,3111,3103,3049,3108,30 89,2989,3010,3065,3104,3092,3100,3107,3062,3039,2997,3098,3074,3093,3036,2279,3071)
    ORDER BY sticky DESC, lastpost DESC

    mysql error: Can't open file: 'post.MYD'. (errno: 5)

    mysql error number: 1016



    I get this error when I try to repair and optmize tables.

    postCheckError: Can't open file: 'post.MYD'. (errno: 5)post
    Please visit us
  • George L
    Former vBulletin Support
    • May 2000
    • 32996
    • 3.8.x

    #2
    first thing i'd do is

    1. close forum to prevent further corruption of database
    2. errorno 5 is an input/output error which could suggest that the actual filesystem structure in the mysql data partition directory for your database name is corrupt. Which means mysql repair functions will not work on the database data in that directory

    I'd do the following to try and fix it

    1. run the following command from ssh telnet as root user WHILE forum is closed

    mysqladmin -u root -p flush-tables

    2. create new empty mysql database called newforumdbname keeping your existing forum database intact and untouched.

    3. once new empty database is created, you need to copy the existing forum databases data over to the new empty database's directory

    first shutdown apache (to prevent error messages) and shutdown mysql

    /etc/rc.d/init.d/httpd stop

    /etc/rc.d/init.d/mysql stop

    now normally mysql data directory is located at /var/lib/mysql so if you forum database is called vbforum it will be located at /var/lib/mysql/vbforum and your new database created would be at /var/lib/mysql/newforumdbname

    you need to check what the existing file ownership/group ownerships are by typing

    ls -alh /var/lib/mysql/vbforum

    you'll see something like

    Code:
    -rw-rw----    1 mysql    mysql        8.4k Sep 29  2002 access.frm
    -rw-rw----    1 mysql    mysql        8.8k Feb  1  2003 access.MYD
    -rw-rw----    1 mysql    mysql         12k Dec  7 06:07 access.MYI
    -rw-rw----    1 mysql    mysql        8.5k Sep 29  2002 adminlog.frm
    -rw-rw----    1 mysql    mysql        223k Feb  1  2003 adminlog.MYD
    -rw-rw----    1 mysql    mysql         36k Dec  7 06:07 adminlog.MYI
    -rw-rw----    1 mysql    mysql        8.4k Sep 29  2002 adminutil.frm
    -rw-rw----    1 mysql    mysql          20 Feb  1  2003 adminutil.MYD
    -rw-rw----    1 mysql    mysql        2.0k Dec  7 06:07 adminutil.MYI
    the files are owned by user/group mysql

    what you need to do WHILE mysql is shutdown is copy all *.MYD, *.MYI and *.frm files in /var/lib/mysql/vbforum to /var/lib/mysqlnewforumdbname with a command like

    cp -R /var/lib/mysql/vbforum/* /var/lib/mysql/newforumdbname

    4. now if you check the size of both

    ls -alh /var/lib/mysql/vbforum
    ls -alh /var/lib/mysql/newforumdbname


    they should be the same, but you may see the newforumdbname listing the user root instead of mysql as user/group for the files

    You'll need to change them back using this command

    chown -R mysql:mysql /var/lib/mysql/newforumdbname

    5. now you need to restart mysql and apache so you can run mysql repair functions

    /etc/rc.d/init.d/mysql start

    /etc/rc.d/init.d/httpd start

    6. type the following commands once mysql server is running again

    mysqladmin -u root -p flush-tables

    mysqlcheck -s -u root -p --all-databases

    (should only report databases that have crashed, corrupted - IGNORE session tables or HEAP tables as they don't matter)

    mysqlcheck -r -q -u root -p --all-databases

    (should do a quick repair of databases reported corrupted or crashed in the previous command output

    once back at prompt run one more time to ensure all tables report OK (excluding session/Heap tables)

    mysqlcheck -s -u root -p --all-databases

    RESULT = your databases should be repaired.

    Edit config.php to point to newforumdbname and take a few days to check if all is fine... Then you can delete the old corrupted database
    Last edited by George L; Sun 7 Dec '03, 6:41am.
    :: Always Back Up Forum Database + Attachments BEFORE upgrading !
    :: Nginx SPDY SSL - World Flags Demo [video results]
    :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

    Comment

    • pulsorock
      Senior Member
      • Aug 2001
      • 306
      • 3.6.x

      #3
      eva,

      That steps you detail there look great for what I need to do. I’ll upgrade from 2.2.1 to 2.3.3 and after that to vB3 Gamma. The steps that you are explaining seems good for my situation, since I have a vB database of almost 1GB and using mysqldump could be quite time consuming and difficult in case I need to restore a backup if anything goes wrong. Doing the way you explain I can copy the database to a new one and do the upgrade on that new database while maintaining the old database intact. I even could rename the old forum folder so no one tries to access anything and get any errors while I do the upgrade.

      What I’m planning to do is, follow your steps on coping the database to a new one, install the upgrade on a new folder, then after I had done all the upgrades successfully, rename the board folder to the previous one users accessed on my site. Any other recommendation you may give me?

      Thanks!

      Comment

      • George L
        Former vBulletin Support
        • May 2000
        • 32996
        • 3.8.x

        #4
        Originally posted by pulsorock
        eva,

        That steps you detail there look great for what I need to do. I’ll upgrade from 2.2.1 to 2.3.3 and after that to vB3 Gamma. The steps that you are explaining seems good for my situation, since I have a vB database of almost 1GB and using mysqldump could be quite time consuming and difficult in case I need to restore a backup if anything goes wrong. Doing the way you explain I can copy the database to a new one and do the upgrade on that new database while maintaining the old database intact. I even could rename the old forum folder so no one tries to access anything and get any errors while I do the upgrade.

        What I’m planning to do is, follow your steps on coping the database to a new one, install the upgrade on a new folder, then after I had done all the upgrades successfully, rename the board folder to the previous one users accessed on my site. Any other recommendation you may give me?

        Thanks!
        pulsorock... the part about making a copy of live database to do upgrade on, is the method i've been using to upgrade vB ever since vB 1.1.3 Except i use mysqldump/ssh telnet to backup and restore rather than copy data files themselves

        I still have original vb databases from vB 1.1.x, vB 2.x.x series for each attempt i do an upgrade. Performing upgrade on a copy of your live database is the best way to be sure

        1. you can revert to a previous backup when needed
        2. if you use mysqldump to backup and restore in this process, you then have a tried and proven test of your sql dump as well - so many times people have sql dumps which are never tested until they are needed, and are then found to be incomplete etc
        :: Always Back Up Forum Database + Attachments BEFORE upgrading !
        :: Nginx SPDY SSL - World Flags Demo [video results]
        :: vBulletin hacked forums: Clean Up Guide for VPS/Dedicated hosting users [ vbulletin.com blog summary ]

        Comment

        • pulsorock
          Senior Member
          • Aug 2001
          • 306
          • 3.6.x

          #5
          Hi

          The reason I want to copy the data files instead of mysqldump is because I did it once when the database wasn’t even half of what it is now and I remember it took several hours to restore the db from the dump. And now since it much bigger, I think it could take much longer… and is that what I want to prevent.


          Just wondering... after the copy of the tables are done, if there any table that I could safely empty that its content will not be used or will need to be recreated after the update? Tables like “word” or “searchindex”?


          Any other tips you can give me before I do all this?

          Thanks!

          Comment

          • remlle
            Member
            • Oct 2002
            • 79

            #6
            well I tried that and got hung up on the copy step.

            cp -R /var/lib/mysql/amateurchronicles_com/* /var/lib/mysql/newamateurchronicles_com


            it copies it all until post.MYI
            then stops and returns
            cp: reading `post.MYI': Input/output error

            what to do now
            Please visit us

            Comment

            • remlle
              Member
              • Oct 2002
              • 79

              #7
              I get this after I try to do another check

              [root@remlle amateurchronicles_com]# mysqlcheck -s -u root -p --all-databases
              Enter password:
              amateurchronicles_com.post
              error : Can't open file: 'post.MYD'. (errno: 5)
              amateurchronicles_com.session
              error : The handler for the table doesn't support check/repair
              athas_net.phpbb_sessions
              error : The handler for the table doesn't support check/repair
              newamateurchronicles_com.post
              error : Can't open file: 'post.MYD'. (errno: -1)
              newamateurchronicles_com.session
              error : The handler for the table doesn't support check/repair
              pacsforum_com.session
              error : The handler for the table doesn't support check/repair
              ratemylover_com.session
              error : The handler for the table doesn't support check/repair
              Please visit us

              Comment

              • Steve Machol
                Former Customer Support Manager
                • Jul 2000
                • 154488

                #8
                Run this query then try again:

                REPAIR TABLE post;
                Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                Change CKEditor Colors to Match Style (for 4.1.4 and above)

                Steve Machol Photography


                Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                Comment

                • remlle
                  Member
                  • Oct 2002
                  • 79

                  #9
                  did that and still a no go. Do I just need to restart the db? should I just restart everything?
                  Please visit us

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    Error code 5: Input/output error

                    It still appears to be a server issue. Sorry but I don't know what else to suggest.
                    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                    Change CKEditor Colors to Match Style (for 4.1.4 and above)

                    Steve Machol Photography


                    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                    Comment

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