Migration from cPanel with remote MySQL database server to Plesk.

Created:

2016-11-16 12:47:52 UTC

Modified:

2017-04-24 12:11:25 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Migration from cPanel with remote MySQL database server to Plesk.

Applicable to:

  • Plesk 12.0 for Linux

Symptoms

When we're trying to migrate from cPanel with remote MySQL database server to Plesk, we get the following error in the Plesk ' Migration & Transfer Manager ' screen:

"Error: migration handler library raised an exception. See pmmcli.log to find out detailed information on this"

Attempt to create a dump manually failed with the following error:

# perl cPanel9.pl -da -co -vvvvvvv
[25902]: 2015-02-01 13:35:24 DEBUG ------------------------------------------------------------
[25902]: 2015-02-01 13:35:24 DEBUG FILE storage initialized.
[25902]: 2015-02-01 13:35:24 DEBUG Base directory: /var/cache/20150201133315314
[25902]: 2015-02-01 13:35:24 DEBUG Space reserved:
[25902]: 2015-02-01 13:35:24 DEBUG Gzip bundles: no
[25902]: 2015-02-01 13:35:24 DEBUG Bundle split size: do not split
[25902]: 2015-02-01 13:35:24 DEBUG ------------------------------------------------------------
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 104
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

Cause

The issue was considered as internal software issue with ID # PPPM-2486 . The fix is considered to be included in one of the next Plesk updates.

Resolution

As a possible workaround for this issue you can do the following:

  1. Make backup of Dumper.pm and Connection.pm on the Plesk server:

    # cp /usr/local/psa/PMM/agents/cPanel9/Dumper.pm{,.orig}
    # cp /usr/local/psa/PMM/agents/shared/Db/Connection.pm {,.orig}
  2. Set XXX.XXX.XXX.XXX value instead of localhost (where XXX.XXX.XXX.XXX is remote MySQL database server's IP-address) in following line of Dumper.pm :

    return Db::DbConnect::getDbConnect( 'mysql', $creds->{'user'}, $creds->{'password'}, 'mysql', 'XXX.XXX.XXX.XXX' );
  3. Comment following line in Dumper.pm :

    #next unless -d $datadir . $database;
  4. Set XXX.XXX.XXX.XXX values instead of localhost (where XXX.XXX.XXX.XXX is remote MySQL database server's IP-address) in following lines in Connection.pm :

    my $conn = _getDbiBackend($type, %params, 'host' => 'XXX.XXX.XXX.XXX');
    ........
    my $conn = _getShellBackend($type, %params, 'host' => 'XXX.XXX.XXX.XXX');
Have more questions? Submit a request
Please sign in to leave a comment.