Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

How to get list of all domains or customers owned by resellers via Plesk CLI

 
clidatabasedomainsplesk cliplesk for linux

Question

How to get a list of all domains or clients owned by resellers via CLI?

Answer

The information about domains or clients owned by resellers can be retrieved from Plesk database:

  1. Connect to the server via SSH/RDP.

  2. Access Plesk database (in Windows, start Command Prompt first):

    # plesk db

  3. List of reseller logins and their domains:

    select clients.login, domains.name from domains,clients where domains.cl_id=clients.id and type='reseller';
    +------------+-------------------+
    | login | name |
    +------------+-------------------+
    | example | example.com |
    +------------+-------------------+

  4. List of reseller logins, reseller names and their domains:

    select clients.login, pname, domains.name from domains,clients where domains.cl_id=clients.id and type='reseller';
    +---------+---------+--------------+
    | login | pname | name |
    +----------+-------+---------------+
    | example | John Doe| example.com |
    +----------+-------+---------------+

  5. List of domains belonging to a specific reseller:

    select clients.pname, domains.name from domains,clients where domains.cl_id=clients.id and type='reseller'and pname='John Doe';
    +---------+--------------+
    | pname | name |
    +---------+--------------+
    | John Doe| example.com |
    +---------+--------------+

  6. List of customers belonging to a specific reseller:

    select group_concat(c.pname) as 'Clients',c1.pname as 'Reseller' from clients c left join clients c1 on c.vendor_id = c1.id where c.vendor_id > 1 and c1.pname = 'John Doe' group by c.vendor_id;
    +-----------+----------+
    | Clients | Reseller |
    +-----------+----------+
    | example,example1 | John Doe |
    +-----------+----------+
    1 row in set (0.00 sec)

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »

Unveiling Sitejet Builder: The Perfect Match for Your Effortless Website Creation Needs

Read More »

Dynamic List vs. Active List: A Comprehensive Comparison – Unveiling the Ultimate Winner!

Read More »
Knowledge Base

Unable to get the list of subscriptions via CLI: Unable to load object of type BsDomain with id

Read More »

How to restore a Plesk backup from CLI?

Read More »

Domains, Subscriptions, Customers, Resellers are missing in Plesk after license downgrade

Read More »

What are the differences between Power User View and Service Provider View in Plesk and how to switch between them?

Read More »

Hosting Wiki

  • CLI
  • Server Redundancy
  • Bare Metal Server
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • Domain
  • Plesk
  • SQL database
  • NoSQL Database
  • Web Server
  • DNS Server
  • SSH
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family