Posts tagged How to list all domains under a client in plesk

How to list all domains under a client in plesk

If you want to find out all the domains under a client in plesk then you can retrieve that information using below 2 simple  mysql queries  ::

 

[[email protected]]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select  id from  clients where login='clientname'";

The above command will  return  the cl_id (Client ID) and using the cl_id you can get the list of domains.

 

[[email protected]]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e "select name from domains where cl_id='6'";

That’s all, easy isn’t it.