Skip to content

FivePD Database Errors: SQLite and MySQL Troubleshooting

Troubleshoot legacy FivePD SQLite or MySQL connection and persistence problems without overwriting databases or running destructive SQL on production.

TroubleshootingArticle updated

First identify which database backend your FivePD package uses. The inspected v1.5 root config.json selects sqlite and also contains a separate connection object that can support a mysql setting. Neither backend can be assumed for every FivePD distribution.

This is a safe diagnostic workflow for legacy servers, not an in-game-tested universal fix.

Symptom and likely diagnostic area

SymptomInspect first
Database error immediately on resource startupBackend selection, missing native library, inaccessible file or MySQL connection.
Player or report data disappears after restartActual data-file location, persistence, transaction handling and server storage lifecycle.
Reports fail but resource startsRead the first database-related exception and the installed schema/version.
MySQL access deniedUsername, password, account host permissions and required privileges.
Database seems empty after moving hostsConfirm which file/database the service is actually using before importing anything.

SQLite: validate the actual database file

The inspected legacy repository contains fivepd.db, along with native SQLite libraries. On your own installation:

  1. Stop the test server and make a recoverable backup of its database file and configuration.
  2. Confirm the runtime is pointing at the expected active file, not a fresh copy in a different working directory.
  3. Check file and directory permissions for the account running FXServer.
  4. Review operating-system compatibility for the specific native SQLite library included with the selected build.
  5. Start the server, create a harmless test record if supported, restart and verify the record persisted.

Do not edit or replace an in-use SQLite file while the game server is writing to it. If recovery is necessary, use a database-aware backup procedure appropriate for that build.

MySQL: diagnose connection separately

The example JSON exposes database.username, database.password, database.host, database.port and database.database. These are configuration keys, not proof of a working connection.

  • Check service health and network reachability from the FXServer host.
  • Confirm the database exists and that the configured account has only the necessary privileges.
  • Check firewall and host allowlists; do not open the database port publicly as a quick fix.
  • Avoid the root account or an empty password shown in a third-party example.
  • Compare the installed schema against the same release’s migration instructions, not unrelated community SQL.

The inspected distribution also contains fivepd.sql, but it should not be treated as a safe production upgrade script merely because it is in a repository.

When to restore or migrate

For a server move or version change, record FivePD version, database backend and schema state. Test a restore into staging, verify records and behavior, then define a downtime and rollback plan. SQLite and MySQL files are not interchangeable just by renaming an extension.

If an installation guide says to import SQL, read the statements for schema creation, updates and destructive operations before running them. A failed import is not a reason to repeat it blindly.

If FivePD itself does not start, use the startup troubleshooting guide. For exact JSON keys, see the FivePD configuration reference. For record and MDT symptoms, use the police computer guide. The legacy server installation guide explains the initial setup and rollback process.