Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
2 registered members (Alento, Larry Miller), 67 guests, and 200 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
Rob Provencher
Rob Provencher
Sudbury, Ontario
Posts: 44
Joined: August 2011
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 27
isaac 21
Ruben 20
Morgan 6
Alento 4
M4TT 2
Latest Photos
Test
Testing to drag photos
Comfortable Cats
Test
BSA photos
Previous Thread
Next Thread
Print Thread
Resetting User Count {v. 7.2.2.} #233490
01/08/10 05:28 PM
01/08/10 05:28 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
I'm not the license holder for the particular forum we're wanting to overhaul, but I do hold a license for another forum, and I'm an administrator at the forum we do want to redo. That being said...

We're running Version: 7.2.2, and due to some crazily explosive drama and a general distaste for the users that have caused it, we're wanting to overhaul it. We'd like to find a way to keep the forum and styles in tact while completely resetting the user count.

The way we have our forum set up {as an RPG}, we also have a corresponding WIKI that lists the avatars to each corresponding member number. However, after the purge of many of the accounts, it leaves a lot of empty and unseemly space.

Is there a way to reset the user count so that, instead of a new user signing up and being #700-something, they could be user #3 or #4 instead? A way to reset all of that without deleting the original Admin account, without deleting styles or forums or post islands etc, and without deleting existing posts? Or is the ONLY way to totally restart the user count to do a total re-install?

Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233491
01/08/10 05:39 PM
01/08/10 05:39 PM
R
Rick  Offline
Former Developer
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
You could delete users excluding the admin and reset the auto increment field, however all of the posts are not going to be visible, since they are tied to the actual userid, so without it, they just won't display.

You could delete the users through the control panel and that would tie all of the posts to the guest user, but not too sure if that's what you want?

Re: Resetting User Count {v. 7.2.2.} [Re: Rick] #233498
01/08/10 06:35 PM
01/08/10 06:35 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Hm.. Let me see if I can explain this better.. because I think we're on the same page but I'm not totally sure.

Users 3-400 have been deleted, as an example. We want someone else to be able to sign up and re-write the User 3 id space. #3, 3.jpg/3.png in the avatar database, etc. Is that what deleting everyone but the admin and resetting the auto-increment field would do?

We're not as worried about posts {we've archived everything in another spot} as we are about not having to totally redo the board.

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233499
01/08/10 06:38 PM
01/08/10 06:38 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Also, would the login names still show up as taken if deleting those accounts happened to be the case? As in..

Login name: abcde
password: 12345

Account's deleted, numbers are reset - would that free up Login name "abcde" again or would we have to figure out different/new login names?

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233503
01/08/10 07:28 PM
01/08/10 07:28 PM
R
Rick  Offline
Former Developer
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
Ok, so if you were to go through and delete users 3-400, then you'd run the following query:

ALTER TABLE ubbt_USERS set AUTO_INCREMENT=3

So the next user will get userid 3. As long as you delete everyone through the control panel, that will free up those user accounts.

I would recommend making a backup of your database first however wink

Re: Resetting User Count {v. 7.2.2.} [Re: Rick] #233508
01/08/10 08:06 PM
01/08/10 08:06 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
We're about to switch domain hosting, registration, and SQL databases anyway...

Reminds me - not part of this topic but what will happen if I transfer from one domain reg/host to another and create a new mysql database? Will the forums fail to work?

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233509
01/08/10 08:28 PM
01/08/10 08:28 PM
R
Rick  Offline
Former Developer
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
When you transfer the domain to a new host, you'll need to transfer the database along with it and then update the config file to point at the new mysql database.

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233510
01/08/10 08:28 PM
01/08/10 08:28 PM
SD  Offline
Former Developer
Joined: Apr 2007
Posts: 4,313
SoCal, USA
nope... i've done this many times wink

just watch out if you are going from linux to windows or vice versa..

facepalm , Rick is faster on the draw than me frown

Re: Resetting User Count {v. 7.2.2.} [Re: SD] #233511
01/08/10 10:00 PM
01/08/10 10:00 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233513
01/08/10 10:03 PM
01/08/10 10:03 PM
G
gliderdad  Offline
veteran
Joined: Jun 2006
Posts: 1,475
NY
Did you transfer your stuff? Did you edit your config file if you change database name, pass, etc?

Re: Resetting User Count {v. 7.2.2.} [Re: gliderdad] #233514
01/08/10 10:09 PM
01/08/10 10:09 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
I got into the mySQL admin and was trying to export for the transfer. Then that happened.

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233515
01/08/10 10:19 PM
01/08/10 10:19 PM
R
Rick  Offline
Former Developer
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
You'll want to edit libs/mysql.inc.php and look for the $showerror ='0'; line and change it to $showerror='1'; so you can see the actual error.

Re: Resetting User Count {v. 7.2.2.} [Re: Rick] #233517
01/08/10 10:35 PM
01/08/10 10:35 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Alright, got that done...

We encountered a problem. The reason reported was

Script:
Line#:
SQL Error: Access denied for user 'LightSide'@'208.109.181.224' (using password: YES)
SQL Error #: 1045
Query: Unable to connect to the database!

Please click back to return to the previous page.

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233518
01/08/10 10:36 PM
01/08/10 10:36 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
I think I know what the issue is - it's the password. I changed it to something else.

EDIT:

I'm not sure how to go about changing which password it asks for.

Last edited by Realta Gaoth; 01/08/10 10:40 PM.
Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233519
01/08/10 10:43 PM
01/08/10 10:43 PM
R
Rick  Offline
Former Developer
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
If you need to change it for UBB.threads, then you're going to need to edit the includes/config.inc.php file. You'll see the settings for the database at the top.

Re: Resetting User Count {v. 7.2.2.} [Re: Rick] #233520
01/08/10 11:04 PM
01/08/10 11:04 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Alright, I've got the forum fixed, back and up and running again.

Now I have to figure out how to transfer this database.

Re: Resetting User Count {v. 7.2.2.} [Re: gliderdad] #233521
01/08/10 11:42 PM
01/08/10 11:42 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Alright, when I go to run the Query, I get this:

Control panel message
ALTER TABLE ubbt_USERS set AUTO_INCREMENT=3

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'set AUTO_INCREMENT=3' at line 1

Return

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233524
01/09/10 12:04 AM
01/09/10 12:04 AM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Also, I went into the Prune Topics and set the dates to "older than Jan 7 2010" and "newer than March 7 2008" - and it said that all had been pruned, but there are still a number of topics laying about...

And now when I try to do it again to delete everything, it says that nothing exists that fits the query I submitted.

Is there any way to mass-delete all of the posts other than the pruning option?

Last edited by Realta Gaoth; 01/09/10 12:20 AM.
Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233536
01/09/10 09:08 AM
01/09/10 09:08 AM
J
Jake Katan  Offline
newbie
Joined: Jan 2010
Posts: 25
Everett, Washington
That alter table should actually be

SQL Query
alter table ubbt_USERS AUTO_INCREMENT=3


You will need to use the prune topics to clean out the tables properly, however if it's not working, open up a support ticket with the following info and one of us will manually do it.

In your support ticket you'll need to supply the following info:

Forum URL
Admin Login Info

and the date range that of topics/posts that you want deleted.

Re: Resetting User Count {v. 7.2.2.} [Re: Jake Katan] #233554
01/10/10 12:11 AM
01/10/10 12:11 AM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Would the same command work if we wanted to reset the forum number?

We deleted all forums and their contents to get rid of the posts, but when we make a new forum instead of starting at "1" it starts at "132" {in the "Keyword" column}

Would the Query be

alter table ubbt_FORUMS AUTO_INCREMENT=1 ?

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233559
01/10/10 09:22 AM
01/10/10 09:22 AM
Scott Young  Offline
newbie
Joined: Jan 2010
Posts: 35
Virginia
Yes, that query will work for the forums table as well.

Re: Resetting User Count {v. 7.2.2.} [Re: Scott Young] #233573
01/10/10 03:49 PM
01/10/10 03:49 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Deleted all forums, used that query, created a new forum - but it still showed up as 134... frown

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233575
01/10/10 04:07 PM
01/10/10 04:07 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
I tried running it again today, just to see if it would work, but now when I go to create a new forum I get this:

Control panel message
insert into ubbt_FORUM_PERMISSIONS values ( '1' , '134' , '1' , '1' , '1' )

Duplicate entry '1-134' for key 1

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233576
01/10/10 04:09 PM
01/10/10 04:09 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
also, when I go into "forum settings" it says that I don't have any forums, but the test forums I created show up on the forum list. >_<

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233578
01/10/10 04:18 PM
01/10/10 04:18 PM
R
Rick  Offline
Former Developer
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
It sounds like maybe some tables aren't emptied. Run these queries to make sure the proper tables are empty, the first one should also reset the auto_increment.

SQL Query
truncate table ubbt_FORUMS


SQL Query
delete from ubbt_FORUM_PERMISSIONS where FORUM_ID <> 'New Forum Template'

Re: Resetting User Count {v. 7.2.2.} [Re: Rick] #233579
01/10/10 04:47 PM
01/10/10 04:47 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
AWESOME, thank you!

Re: Resetting User Count {v. 7.2.2.} [Re: Rick] #233596
01/10/10 07:16 PM
01/10/10 07:16 PM
Realta Gaoth  Offline OP
journeyman
Joined: May 2009
Posts: 54
Originally Posted by Rick
When you transfer the domain to a new host, you'll need to transfer the database along with it and then update the config file to point at the new mysql database.


When you refer to this, which config file do you mean? smile

Re: Resetting User Count {v. 7.2.2.} [Re: Realta Gaoth] #233598
01/10/10 07:34 PM
01/10/10 07:34 PM
R
Rick  Offline
Former Developer
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
The one inside the includes directory. includes/config.inc.php


Shout Box
Today's Birthdays
No Birthdays
Recent Topics
"UBB 10 years" image/button question
by Morgan. 10/22/18 09:35 AM
image test
by JPG. 10/21/18 10:06 AM
Upgrade from a really really old version
by Alento. 10/18/18 06:16 PM
Subscription Feature
by M4TT. 10/16/18 09:34 PM
PHP 7.2 compatibility
by Pak. 10/16/18 06:00 PM
Forum Statistics
Forums36
Topics35,153
Posts191,544
Members12,109
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.2