Announcement

Collapse
No announcement yet.

Help! Database errors!

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

  • Help! Database errors!

    I've been dealing with random database errors for weeks, and I'm not sure why. I thought I had everything figured out last week, but now I can't even access my admincp.

    I don't understand why I'm having so many issues...but here's my current one. I need help ASAP:

    Database error The EvoXForums.com - Mitsubishi Lancer Evolution X Forums database has encountered a problem. Please try the following:
    • Load the page again by clicking the Refresh button in your web browser.
    • Open the www.evoxforums.com home page, then try to open another page.
    • Click the Back button to try another link.

    The www.evoxforums.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
    We apologise for any inconvenience.

  • #2
    When you get the error page, view the source code. Near the bottom of the source code is the detailed database error. Copy/paste that here.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment


    • #3
      i would suggest your database errors are due to your host..

      dreamhost is a heavy overseller.... i suggest you look into finding another host that absolutely does not oversell

      i would personally (although im sure i am biased...) recommend my host http://www.montecarlohosting.net/content/view/18/43/ you will find their shared plans there.

      i joined MCH around feb. of 2006.. their shared hosting is super! they are constantly having 99.9%+ uptimes for months on end.. i went once like 8 months without ANY downtime

      Comment


      • #4
        @uberjon - I have a private server on dreamhosts, if that matters.

        @Lynne - looks like i need the administrator table repaired...how do i do that?

        <!--
        Database error in vBulletin 3.6.9:

        Invalid SQL:

        SELECT administrator.*,
        userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate,
        IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,
        language.phrasegroup_cphome AS phrasegroup_cphome,
        language.phrasegroup_cpglobal AS phrasegroup_cpglobal,
        language.phrasegroup_global AS phrasegroup_global,
        language.options AS lang_options,
        language.languagecode AS lang_code,
        language.charset AS lang_charset,
        language.locale AS lang_locale,
        language.imagesoverride AS lang_imagesoverride,
        language.dateoverride AS lang_dateoverride,
        language.timeoverride AS lang_timeoverride,
        language.registereddateoverride AS lang_registereddateoverride,
        language.calformat1override AS lang_calformat1override,
        language.calformat2override AS lang_calformat2override,
        language.logdateoverride AS lang_logdateoverride,
        language.decimalsep AS lang_decimalsep,
        language.thousandsep AS lang_thousandsep

        FROM user AS user
        LEFT JOIN userfield AS userfield ON (user.userid = userfield.userid)
        LEFT JOIN usertextfield AS usertextfield ON (usertextfield.userid = user.userid) LEFT JOIN administrator AS administrator ON (administrator.userid = user.userid) LEFT JOIN language AS language ON (language.languageid = IF(user.languageid = 0, 1, user.languageid))

        WHERE user.userid = 1;

        MySQL Error : Table './evoxforums_database/administrator' is marked as crashed and last (automatic?) repair failed
        Error Number : 144
        Date : Saturday, August 30th 2008 @ 08:35:37 AM
        Script : http://www.evoxforums.com/forums/admincp/index.php
        Referrer : http://www.evoxforums.com/forums/private.php
        IP Address :
        Username :
        Classname : vb_database
        -->
        Last edited by Kooldino; Sun 31 Aug '08, 8:31am.

        Comment


        • #5
          Go to admin cp > maintenance > repair/optimize tables > select the table and hit Continue at the bottom of the page.

          Please don't PM or VM me for support - I only help out in the threads.
          vBulletin Manual & vBulletin 4.0 Code Documentation (API)
          Want help modifying your vbulletin forum? Head on over to vbulletin.org
          If I post CSS and you don't know where it goes, throw it into the additional.css template.

          W3Schools &lt;- awesome site for html/css help

          Comment


          • #6
            I suggest you remove your IP from that quote.

            To repair a table, try running this:
            (any filename).php
            PHP Code:
            <?php
            include('./global.php');
            global 
            $vbulletin;
            $query $vbulletin->db->query_write("REPAIR TABLE " TABLE_PREFIX "administrator")
            if(
            $query
            {
               echo 
            "Successfully ran query.";
            }
             else 
            {
               echo 
            "Failed to run query, mysql error <b>" $vbulletin->db->errno "</b>";
            }
            die(
            '<br /><br />Return this result to <a href="http://www.vbulletin.com/forum/showthread.php?t=283370"><i>Help! Database errors!</i></a>.');
            ?>
            Edit: Lynne, please note it is the administrator table and that it will not allow users to access the admin cp.
            Last edited by SNN; Sat 30 Aug '08, 7:47am. Reason: added a line cause I am bored :D

            Comment


            • #7
              Originally posted by SNN View Post
              Edit: Lynne, please note it is the administrator table and that it will not allow users to access the admin cp.
              Where is the smilie that bops me on the head?

              If you have access to phpMyAdmin, you can also repair/optimize the table from there (or do as SNN suggested which is nice and easy).

              Please don't PM or VM me for support - I only help out in the threads.
              vBulletin Manual & vBulletin 4.0 Code Documentation (API)
              Want help modifying your vbulletin forum? Head on over to vbulletin.org
              If I post CSS and you don't know where it goes, throw it into the additional.css template.

              W3Schools &lt;- awesome site for html/css help

              Comment


              • #8
                Dunno. I'm just not in the "smilie" use mood today...

                @Kooldino:
                You can also do this for any other table that you see this happen to.
                PHP Code:
                <?php
                if(!$_POST['table']) {
                print <<<EOF
                <form method="POST">Table Name: 
                <input type="text" name="table" value="administrator"> 
                <input type="submit" value="Repair Table">
                </form>
                EOF;
                die(
                ' ');
                }
                include(
                './global.php');
                global 
                $vbulletin;
                if(!
                $show['admincplink']) print_no_permission();
                $query $vbulletin->db->query_write("REPAIR TABLE " TABLE_PREFIX $_POST[table])
                if(
                $query
                {
                   echo 
                "Successfully ran repair on " $_POST[table] . ".";
                }
                 else 
                {
                   echo 
                "Failed to run query, mysql error <b>" $vbulletin->db->errno "</b>";
                }
                ?>

                Comment


                • #9
                  Originally posted by Lynne View Post
                  Go to admin cp > maintenance > repair/optimize tables > select the table and hit Continue at the bottom of the page.
                  I guessed you missed my first post. The issue is that this error is preventing me from accessing the admincp...

                  Comment


                  • #10
                    @SNN - I ran that from the admincp directory (I wasn't sure where to run it from) and ended up with the following error:

                    Parse error: syntax error, unexpected T_IF in adminrepair.php on line 5
                    Where should I be running it from? How do I get around this error? Thanks.

                    Comment


                    • #11
                      @SNN -I got errors on your second php file as well (but on line 15)...I "solved" them both by adding semicolons to the end of the query lines. Not sure if I should have or not.

                      They seem to run with no errors, but it then brings me back to the same vbulletin error page that i orginally posted about.

                      I have the files set with execute permissions.

                      Comment


                      • #12
                        I am pretty sure you can upload the tools.php page and run repair on tables also. Or, do you have access to phpMyAdmin? Line 15 on the second script is "if($query)" and it should not have a semicolon after it.

                        Please don't PM or VM me for support - I only help out in the threads.
                        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                        Want help modifying your vbulletin forum? Head on over to vbulletin.org
                        If I post CSS and you don't know where it goes, throw it into the additional.css template.

                        W3Schools &lt;- awesome site for html/css help

                        Comment


                        • #13
                          I do have access to phpMyAdmin, but don't know what to do with it.

                          Line 15 is where the error occured, so I put the semicolon on line 14.

                          I'm not sure what changed, but when I checked earlier, I could get in...not sure why.

                          Tell me more about tools.php

                          Comment


                          • #14
                            In phpmyadmin, select the table to be repaired (check the checkbox next to the table name), scroll to the bottom of the page and from the menu select Repair Table. You will go to a confirmation page, make sure that this says REPAIR TABLE - if it doesn't go back and try again - and click ok (or it might be yes). Keep doing this until the problem is resolved. You may also need to do other tables. You can select all tables and do them all at once, although this is not recommended for large databases as it is likely to time out.
                            Kerry-Anne :)

                            Twitter Blog

                            www.peterska2.com www.worldnewszone.com www.popularusenetgroups.com www.superclickers.co.uk www.forumsforchrist.com www.browsergameplanet.com

                            Comment


                            • #15
                              Kerry-Anne, thank you! I got that to work.

                              Unfortunately, I think uberjon is right...Dreamhosts is screwing me over. Yet again, I'm having database issues, except this time, it's on two of my websites that are unrelated...

                              This is an example of what I'm getting...
                              <!--
                              Database error in vBulletin :

                              Invalid SQL:

                              SELECT *
                              FROM datastore
                              WHERE title IN ('','options','bitfields','attachmentcache','forumcache','usergroupcache','stylecache','la nguagecache','products','pluginlist','cron','profilefield','smiliecache','bbcodecache','ma ilqueue');

                              MySQL Error : Incorrect information in file: './evoxforums_database/datastore.frm'
                              Error Number : 1033
                              Date : Tuesday, September 2nd 2008 @ 09:12:16 PM
                              Script : http://www.evoxforums.com/forums/showthread.php?t=5879
                              Referrer :
                              IP Address :
                              Username :
                              Classname : vb_database
                              -->

                              Comment

                              Loading...
                              Working...
                              X