Guide to Accessing and Editing Your SWGEmu Database Using DBeaver

After setting up your SWGEmu server on Debian 11, you may need to manually edit fields in the database, such as updating IP addresses or granting admin privileges to users within the game. Using a graphical database management tool like DBeaver makes it easier to visualize, edit, and save changes to your database.

This guide will walk you through installing DBeaver via the command line and using it to edit your SWGEmu database.


Prerequisites


Installing DBeaver

DBeaver is a free, open-source, cross-platform database tool that supports MariaDB/MySQL and many other databases. Here's how to install it on your Debian 11 system via the command line.

Step 1: Install Wget (if not already installed)

sudo apt update
sudo apt install -y wget

Step 2: Download DBeaver

Use wget to download the latest DBeaver Community Edition Debian package:

wget --no-check-certificate https://dbeaver.io/files/dbeaver-ce_latest_amd64.deb

Note: The --no-check-certificate option bypasses SSL certificate checks.

Step 3: Install DBeaver

sudo apt install -y ./dbeaver-ce_latest_amd64.deb

Connecting DBeaver to Your MariaDB Database

Step 1: Launch DBeaver

Step 2: Create a New Database Connection

  1. Start the Connection Wizard:
  2. Select the Database Type:

Step 3: Enter Connection Details

Fill in the following details:

Note: If prompted to download the MariaDB driver, click "Download" to proceed.

Step 4: Test the Connection

  1. Click on "Test Connection":
  2. Verify the Connection:
  3. Finish:

Using DBeaver to Edit Your Database

With DBeaver connected to your database, you can now view and modify your database tables.

Step 1: Navigate the Database

  1. Expand the Connection:
  2. Access the Databases Folder:
  3. Select the swgemu Database:

Step 2: View and Edit Tables

  1. Open a Table:
  2. Select "View Data":
  3. Modify Data:

Granting Admin Privileges to a User

To grant admin privileges to a user in the game:

  1. Open the accounts Table:
  2. Locate the User Account:
  3. Edit the admin_level Field:
  4. Note: In order to use admin commands in the SWG client, you need to edit the users.cfg file of the game client (not the server) and add the following:
    [ClientGame]
    0fd345d9 = TRUE

    [ClientUserInterface]
    debugExamine = TRUE
  5. Save Changes:

Updating the Galaxy Table with Your Public IP Address

To allow clients to connect to your server over the internet, you need to update the galaxy table with your public IP address.

  1. Find Your Public IP Address:
  2. Open the galaxy Table:
  3. Edit the address Field:
  4. Save Changes:
  5. Restart the SWGEmu Server:

Note: Ensure that your firewall settings allow incoming connections on the necessary ports and that your router is configured to forward these ports to your server if you're behind a NAT.


Additional Tips


Conclusion

By installing DBeaver and connecting it to your MariaDB database, you gain a powerful tool to manage your SWGEmu server's data. Whether you're granting admin privileges or updating configuration settings like the server's public IP address, DBeaver simplifies these tasks with its intuitive interface.