↑ ↓ select, Enter open, Esc close

List all databases with their domain in Plesk

root@server
plesk db "SELECT d.name AS domain, db.name AS datenbank, db.type FROM data_bases db JOIN domains d ON d.id = db.dom_id ORDER BY d.name, db.name"

Reads from the Plesk management database which databases belong to which domain. Useful when cleaning up orphaned databases or when all databases of a customer need to be backed up before a migration. Databases created directly in MySQL do not show up here.

Note: For a single domain, add WHERE d.name = 'example.com' before ORDER BY.

Also searched as

  • which database belongs to which domain plesk
  • plesk show databases of a domain
  • find database of wordpress installation

Related one-liners

All in Plesk

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.