How to Fix the Plesk Error When Opening the Database List: “Dependent row(s) isn’t found”

Plesk is one of the most widely used server management platforms, but occasionally, unexpected errors can occur, affecting its functionality. One common issue arises when attempting to access the database list under Tools & Settings > Database Servers, where Plesk displays the following error:

Type GraphQL Error
Message Dependent row(s) 'Domains.id = 783' isn't found for 'data_bases.dom_id = 783'.

This message indicates an inconsistency in the Plesk database, preventing the proper display and management of databases. Below, we explain the cause of the issue and provide a step-by-step solution.


Cause of the Issue

This error occurs because there are records in the data_bases table of the Plesk PSA database that are linked to a nonexistent domain in the domains table. This can happen due to improper domain deletions or synchronization issues in Plesk’s internal database.

Running the following query in the PSA database will confirm that databases are associated with a domain ID that no longer exists in the domains table:

SELECT * FROM data_bases WHERE dom_id = 783;

Example output:

+-----+----------+-------+--------+--------------+-----------------+-------------+
| id | name | type | dom_id | db_server_id | default_user_id | external_id |
+-----+----------+-------+--------+--------------+-----------------+-------------+
| 337 | example1 | mysql | 783 | 1 | NULL | NULL |
| 338 | example2 | mysql | 783 | 1 | NULL | NULL |
+-----+----------+-------+--------+--------------+-----------------+-------------+

However, if we try to find the domain with id = 783 in the domains table, the query returns an empty set:

SELECT name FROM domains WHERE id = 783;

Result:

Empty set (0.000 sec)

This confirms that the databases are referencing a domain that no longer exists in the system.


Solution

To resolve this issue, we need to remove the orphaned records from the data_bases table.

Step 1: Connect to the Server via SSH

Access your server via SSH with the root user:

ssh root@your-server

Step 2: Access the Plesk PSA Database

Run the following command to enter Plesk’s PSA database:

plesk db

Step 3: Check for Orphaned Records

Before deleting anything, verify if there are orphaned databases associated with a nonexistent domain:

SELECT * FROM data_bases WHERE dom_id = 783;

If this query returns records, the error is present.

Step 4: Delete the Orphaned Records

Run the following command to remove the databases linked to the nonexistent domain:

DELETE FROM data_bases WHERE dom_id = 783;

Step 5: Confirm the Deletion

To ensure the issue is resolved, run the query again:

SELECT * FROM data_bases WHERE dom_id = 783;

If no results are returned, the orphaned databases have been successfully removed.

Step 6: Restart Plesk

To apply the changes, restart Plesk using the following command:

plesk restart

Final Verification

After completing these steps, go back to Tools & Settings > Database Servers in Plesk. The database list should now load without errors and function normally.


Conclusion

The “Dependent row(s) isn’t found” error in Plesk occurs due to inconsistencies in the platform’s internal database. By following the steps outlined above, you can safely remove orphaned records and restore proper database management functionality.

To prevent similar issues in the future, consider the following best practices:

  • Always use Plesk’s interface to delete domains and databases instead of manual deletions.
  • Regularly back up the PSA database before making configuration changes.
  • Run integrity checks using the following command: plesk repair db

By following these best practices, you can maintain a more stable and secure Plesk environment.

Scroll to Top