How to manually migrate a MySQL database from another Plesk?

Created:

2016-12-12 03:42:56 UTC

Modified:

2017-08-08 13:22:21 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to manually migrate a MySQL database from another Plesk?

Applicable to:

  • Plesk 12.5 for Windows

Question

How to manually migrate a MySQL database db_name from another Plesk?

Answer

I. Take a dump on the source server

  1. Go to Server > Database servers > MySQL servername > databases and click db_name to see the database users list

  2. Contact the database owner to get the database user password. Or just reset it at Server > Database servers > Database server management > db_name > db_user

  3. Take the database dump:

     "%plesk_dir%\\MySQL\\bin\\mysqldump.exe" -P3306 -udb_user -p**********  --skip-extended-insert intranet > D:\\db_name.dump.sql

II. Transfer the database dump to the target server

In case of very big database file, it can be compressed to a ZIP file. Then, the ZIP file should be transferred to the target server. RDP connection can be used for it, for example. Unzip the file on the target.

III. Restore the dump on the target server

  1. Create an empty db_name database:

1.1 in Plesk administration panel, go to Subscriptions > example.com > databases and press "Add Database": - database name: db_name - Related site: db_name.example.com - database username: db_user - password: * *

  1. Restore the database content:
    "%plesk_dir%\\MySQL\\bin\\mysql.exe" -P3306 -udb_user -p******* db_name < D:\\db_name.dump.sql

Note : in case any issues appear during restoration of the database via command prompt, make sure that versions of mysql on the both source and destination servers are compatible.

Have more questions? Submit a request
Please sign in to leave a comment.