1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.0 Resetting user_id ??

Discussion in 'XenForo Questions and Support' started by steven s, Oct 25, 2011.

  1. steven s

    steven s Well-Known Member

    In our test install we have deleted all posts and usernames.
    Now when a new user is created the id is in the 4000s.

    We kept the admin user id as 1.
    Can I change the auto increment so the next user to register will be 2?

    Same question for post_id, thread_id and whatever else I missed.
    Currently I have no threads or forums.
  2. James

    James Well-Known Member

    Restarting the MySQL server should fix it, it's because the AUTO_INCREMENT automatically increments it from the ID that was last used (if I recall) and restarting the server should force it to AUTO_INCREMENT from the last ID stored in the database, not in memory.

    Someone please correct me if I'm wrong :D
    Fuhrmann likes this.
  3. Fuhrmann

    Fuhrmann Well-Known Member

    This works for me.
    Andrej likes this.
  4. James

    James Well-Known Member

    D'oh... :oops:
    Fuhrmann likes this.
  5. steven s

    steven s Well-Known Member

    Thanks all.
    How many places auto-increment?
  6. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    That is one of the reasons I recommend you do not build onto a test forum:


    By the way, how did you mass prune your users? There is no utility for that in the software so I am concerned that you tried to manually query the database which is a daunting task considering how many tables reference user_ids. You will end up having problems in the future with the old user_ids still floating around the database.

    In short, don't try to do what you are doing. Install fresh and start over with your import.
  7. steven s

    steven s Well-Known Member

    Our developers removed the forums, posts and users.
    I don't know how.

Share This Page