To grant an user permission and right to run Execute SQL Query from Control Panel, simply login to your web server which is running vBulletin forum. Then edit the /includes/config.php file.
Find the following line:
// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
After a few lines, you should see the following setting:
$canrunqueries = ”;
Add in the user IDs of the forum members, moderators or administrators that you want to enable their ability to be able to run SQL queries in between the quotes (‘). Note that it’s user ID and not user name. User ID is the number assigned to the user account automatically and sequentially. For example, if you want to add the right to administrator, who is usually the first person created on the board, and thus has the user ID number 1, change the line to:
$canrunqueries = ‘1’;
To add more users, simply seperate them with comma (,).