useful command for plesk maintenace

useful command for plesk maintenace

here some useful command  for plesk maintenance

get ftp user password

mysql -uadmin -p` cat /etc/psa/.psa.shadow` -Dpsa -e"SELECT login AS FTP_USER,password AS FTP_PASS,home AS DOMAIN_ROOT,accounts.id,sys_users.account_id FROM accounts, sys_users WHERE accounts.id=sys_users.account_id;"

get email user password

mysql -uadmin -p` cat /etc/psa/.psa.shadow` -Dpsa -e"select mail_name,name,password from mail left join domains on mail.dom_id = domains.id inner join accounts where mail.account_id = accounts.id;"

repair all table in mysql database

mysqlcheck -u admin -p` cat /etc/psa/.psa.shadow`  --auto-repair --check --optimize --all-databases