Listing email address and password in plesk

Written on 3:53 PM by David S Anand

FYI: This article is only for cutting down the resolving time of email issue in plesk.

to get the email address and password list login to shell via root

1. [root@shark03 ~]# cat /etc/psa/.psa.shadow
Thepass
2.[root@shark03 ~]# mysql -u admin -p
Enter password:
3. mysql> use psa;
4. SELECT accounts.id, mail.mail_name, accounts.password, domains.name FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id;

Run the above query all the email account with their respective password and
domain names will be displayed .

Reset mysql root password when lost

Written on 3:44 PM by David S Anand

How to Reset Mysql root password without old password ..

Follow the steps .........
1) Log in to the server as root

2) Stop the MySql server by typing:

/etc/rc.d/init.d/mysqld stop

3) Restart safe_mysqld with the skip-grant-tables option by typing:

/usr/bin/safe_mysqld -Sg &

4) Start MySql as root by typing:

mysql -u root -p mysql (When prompted for a password, just hit enter)

5) Set a new password for root by typing:

update user set password=password("new_pass") where user='root'; (Replace new_pass with you new desired password)

flush privileges;

quit

/etc/rc.d/init.d/mysqld restart