Find all databases and login credentials
If you need to list all of the MySQL databases managed by Plesk along with their corresponding domains and login credentials, you can use this handy query:
SELECT domains.name AS domain_name, data_bases.name AS database_name, db_users.login, accounts.password FROM data_bases, db_users, domains, accounts WHERE data_bases.dom_id = domains.id AND db_users.db_id = data_bases.id AND db_users.account_id = accounts.id ORDER BY domain_name;
Thanks to Juan Carlos Lopez for the suggestion!
Related documentation
December 8th, 2008 in Database Queries, MySQL Queries | tags: accounts, databases, data_bases, domains