Adding multiple admin users through MyphpAdmin in OJS

In this post, we’ll walk you through the process of assigning admin privileges to the second and subsequent users in your Open Journal Systems (OJS) installation. We’ll use MyphpAdmin and SQL queries to achieve this. Let’s get started!

1. Log in to MyphpAdmin

First, log in to MyphpAdmin to access your OJS database.

2. Select the OJS Database

After logging in, find and select the database where OJS is installed from the left-hand menu.

3. Locate the user_user_groups Table

Once inside the database, find the user_user_groups table and click on it. This table manages which users belong to which groups. We’ll use it to assign admin privileges to the users you’ve created.

4. Open the SQL Tab

After selecting the table, go to the top of the page and click on the SQL tab. Here, you can execute SQL queries to modify the table.

5. Delete the Default Query

In the SQL tab, you’ll likely see a default query like this:

SELECT * FROM user_user_groups WHERE 1;

Delete this line entirely.

6. Structure the SQL Query to Assign Admin Privileges

Let’s assume you only have two users:

  • The first user: The administrator created during the OJS setup.
  • The second user: A user you created via the OJS UI.

To assign admin privileges to the second user, paste the following SQL query:

insert into user_user_groups (user_group_id, user_id) values (1,2);

This query assigns the user with user_id 2 to the admin group (user_group_id 1).

7. Run the Query

After pasting the query, click the Go button at the bottom right to execute the query.

8. Assign Admin Privileges to the Third User

If you’ve created a third user and want to make them an admin, use this SQL query:

insert into user_user_groups (user_group_id, user_id) values (1,3);

9. Assign Admin Privileges to the Fourth User

For a fourth user, use this query:

insert into user_user_groups (user_group_id, user_id) values (1,4);

You can repeat this process for any number of users by adjusting the user_id to match the desired user.

10. Refresh to See the Changes

Once the query is executed, go back to the Browse tab and click the Refresh button at the top to view the changes.

Conclusion

By following these simple steps, you can assign admin privileges to new users or update existing ones in your OJS system. This process is crucial when working on projects that involve multiple administrators.

Categories:

Comments are closed

0
    0
    Your Cart
    Your cart is emptyReturn to Shop