Database Error in 3.8.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gg2-hungama
    New Member
    • Jan 2009
    • 18

    Database Error in 3.8.1

    Database error in vBulletin 3.8.1:

    Invalid SQL:
    INSERT INTO administrator
    (userid)
    VALUES
    (47);

    MySQL Error : Duplicate entry '47' for key 1
    Error Number : 1062

    this is what i get

    problem is one of the administrator on my site becomes regular user automatically so i have to edit his profile every morning and after changing his primary group to administrator ..when i click on save i get this error
  • Jinovich
    Senior Member
    • Feb 2005
    • 232
    • 3.5.x

    #2
    This error is associated when you are trying to add the same value into a field which is should be unique.

    By the looks of it, your administrator is already in the "administrator" table and you are trying to add him in there again.

    I would take a backup of your database first and they try deleting the row which contains userid 47 from your administrator table in your database then try adding him or her back in.

    It's weird that your admin keeps getting bumped out the admin usergroup.

    Have you got and plugins installed?

    If so I would edit your config.php and add
    Code:
    define('DISABLE_HOOKS', true);
    straight after <?php to disable your hooks and see if your admin still gets bumped out the admin usergroup.

    Comment

    • gg2-hungama
      New Member
      • Jan 2009
      • 18

      #3
      thanks jinovich ..let me try this and get back here appriciate for reply

      Comment

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

        #4
        If that doesn't work then run Repair/Optimize in the Admin CP. You may need to run it more than once to fix all errors:

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

        If you cannot access the Admin CP you can also use phpMyAdmin to repair tables.

        If that doesn't work then this may be too damaged to fix with the normal methods. Please check out this thread for other ways to repair a db, particularly items #2 and 3:



        You may have to ask your host to try and repair this for you.
        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

        • gg2-hungama
          New Member
          • Jan 2009
          • 18

          #5
          Originally posted by Jinovich
          This error is associated when you are trying to add the same value into a field which is should be unique.

          By the looks of it, your administrator is already in the "administrator" table and you are trying to add him in there again.

          I would take a backup of your database first and they try deleting the row which contains userid 47 from your administrator table in your database then try adding him or her back in.

          It's weird that your admin keeps getting bumped out the admin usergroup.

          Have you got and plugins installed?

          If so I would edit your config.php and add
          Code:
          define('DISABLE_HOOKS', true);
          straight after <?php to disable your hooks and see if your admin still gets bumped out the admin usergroup.
          i did edit the config.php the way u said it but it made disappear my shoutbox and statistic mod any other way and i followed all the steps that u said and Steve Machol said except the link he posted ..still same problem and i went to myphpadmin and deleted the id 47 and i asked him to reregister and i will make him admin again lets see if the problem accurs again


          made him register again and got same problem

          Database error in vBulletin 3.8.1:

          Invalid SQL:
          INSERT INTO administrator
          (userid)
          VALUES
          (53);

          MySQL Error : Duplicate entry '53' for key 1
          Error Number : 1062
          Request Date : Saturday, February 7th 2009 @ 08:31:18 PM
          Error Date : Saturday, February 7th 2009 @ 08:31:18 PM
          Script : http://gg2-hungama.com/forum/admincp/user.php?do=update
          Referrer : http://gg2-hungama.com/forum/admincp...p?do=edit&u=53
          IP Address : 70.101.135.104
          Username : Admin
          Classname : vB_Database
          MySQL Version : 5.0.67-community-log
          Last edited by gg2-hungama; Sat 7 Feb '09, 6:32pm.

          Comment

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