MySQL

Mysql Shortcuts

Linux Shortcuts

Find Plesk Password on older plesk versions. Login via ssh as root and run the following command:


# /usr/local/psa/bin/admin --show-password

Show encrypted admin password:


# cat /etc/psa/.psa.shadow

Show Plesk MySQL password


# mysql -uadmin -p`cat /etc/psa/.psa.shadow`

Show processlist


# mysqladmin -u admin -p`cat /etc/psa/.psa.shadow` processlist

Export Plesk database


# mysqldump  -u admin -p`cat /etc/psa/.psa.shadow` database > /tmp/database.sql

Import Plesk database
# mysql -u admin -p`cat /etc/psa/.psa.shadow` database < /tmp/database.sql Email Commands


/usr/local/psa/admin/bin/mailqueuemng -s
tail -50 /usr/local/psa/var/log/maillog
tail -50 /var/log/maillog
tail -50 /var/log/exim_mainlog

RAM


# curl -s http://dev.patlathem.com/mem.txt | python

Windows Shortcuts


cd %plesk_bin%
plesksrvclient -get


rdesktop -g 1024x768 -P IPaddress -u administrator
rdesktop ipaddress -g 1024x768

# mysql -uroot -p status
Uptime: 68730 Threads: 378 Questions: 459474 Slow queries: 0 Opens: 17283 Flush tables: 15 Open tables: 201 Queries per second avg: 6.685
# mysqladmin -uroot -p processlist
Enter password: 
+----+------+-----------+----+---------+------+-------+------------------+
| Id | User | Host      | db | Command | Time | State | Info             |
+----+------+-----------+----+---------+------+-------+------------------+
| 13 | root | localhost |    | Query   | 0    | init  | show processlist |
+----+------+-----------+----+---------+------+-------+------------------+