Posts Tagged with plesk

posted by qubix on October 11, 2015

I tried some days ago to transfer some accounts from a plesk vps to a cpanel one. Having root access to both machines and using cpanel's transfer tool I thought it would be a simple task but upon the first transfer something went wrong..

Starting “TRANSFER” for “Account” “asdasd”.
Copy Destination: /home
Remote server type: “plesk”.
Packaging the account with the command: /scripts/ asdasd '' --split --compressed --mysql 5.5 --allow-multiple …
Unknown option: compressed
Unknown option: mysql
MySQL error: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) at /tmp/.perl-ppk-Kh2FBV/lib/Cpanel/Foreign/Plesk/ line 117.
Target “/home” on host “” has 412 GB free and requires at least 0 bytes free, which includes space for temporary files.
WARNING: The remote server failed to send the location of the transfer archive.
WARNING: Attempting to guess the location of the remote transfer archive.
Fetching md5sum of “/home/cpmove-asdasd.tar.gz” from the remote server … …
Removing copied archive on remote server. …

Failed: The remote execution of “” was not sucessful, or the requested account, “asdasd” was not found on the server: “IP ADDRESS”.

as we can see, the process stopped because the migration script could not connect to plesks mysql.

trying to find out what happened I realized that I couldn't connect either manually.

In plesk the password is stored in a file: /etc/psa/.psa.shadow
that ".shadow" doesn't look good and indeed tha password in that file is AES encrypted,something like

According to plesk documentation you can see the password with the command:
/usr/local/psa/bin/admin --show-password

Amazingly it worked. What it didn't work is logging into mysql with it...again the same error trying
mysql -uadmin -ptheabovepassword

It turns out that mysql in plesk wants the encrypted version of it not the plaintext.So the correct command would be:
mysql -uadmin -p`cat /etc/psa/.psa.shadow`

well..that was weird :P

Now you can populate the file /root/.my.cnf with the correct credentials so cpanel can connect to plesk mysql and account transfer be completed successfully!

And the contents of .my.cnf file (place them without the lines!)