Skip to content

Instantly share code, notes, and snippets.

@siliconmeadow
Created November 4, 2013 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save siliconmeadow/7303365 to your computer and use it in GitHub Desktop.
Save siliconmeadow/7303365 to your computer and use it in GitHub Desktop.
To find the database names, database usernames and passwords which belong to a database in Plesk
SELECT domains.name, data_bases.name, db_users.login, SUBSTRING(accounts.password, 1)
FROM domains, data_bases, db_users, accounts
WHERE domains.name LIKE '%<domain.dom>%'
AND db_users.account_id = accounts.id
AND db_users.db_id = data_bases.id
AND data_bases.dom_id = domains.id
ORDER BY data_bases.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment