Thread:Project:Support desk/How do I change user rights through the database?/reply

Huh, through the DB? Really the hard way? The DB table user_groups contains the user id and the associated user groups. See Manual:User_groups_table for details.

I don't know your exact situation, but mightn't it be easier to temporarily grant any user the right to change user rights? This can be done by setting $wgGroupPermissions['*']['userrights'] = true; in LocalSettings.php. Then login/register any user and change the rights as needed. (Do not forget to remove this line again afterwards! ;-) )