MyBB Community Forums
[How To?] Change new UIDs in database - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: 1.8 Support (https://community.mybb.com/forum-175.html)
+--- Forum: General Support (https://community.mybb.com/forum-176.html)
+--- Thread: [How To?] Change new UIDs in database (/thread-211856.html)



Change new UIDs in database - ShadowOne - 2017-07-21

Everything was fine with my board 'till a previous Admin with Cpanel access changed last uid from 150 to 5000.

This lead all new users to have uid 5001,5002,5003... etc.

I want to rever back to uid=150 to fill this hole, but I'm afraid db engine will keep reading the highest uid value and increment it.

How can this be fixed?


RE: Change new UIDs in database - .m. - 2017-07-21

you may have to manually change the new higher UIDs to normal UIDs and
modify auto_increment value depending on the last UID (see this reply)


RE: Change new UIDs in database - ShadowOne - 2017-07-21

(2017-07-21, 09:58 AM).m. Wrote: you may have to manually change the new higher UIDs to normal UIDs and
modify auto_increment value depending on the last UID (see this reply)

Done, the problem is that UIDs now are back to 5000+

I've edited latest uid and turned it to 150, then edited auto_increment to 150.

I created a test account and, after joining, an SQL error has been returned warning about missing fields. It had uid = 150

2 additional test accounts have been created and these last 2 have uid with 5000+


RE: Change new UIDs in database - Devilshakerz - 2017-07-21

The AUTO_INCREMENT value holds the next index that will be assigned - increment it by adding 1 and try again.