How to transfer MySQL databases in bunch

Created:

2016-11-16 12:46:25 UTC

Modified:

2017-04-24 11:06:15 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to transfer MySQL databases in bunch

Applicable to:

  • Plesk for Windows

Question

How to transfer MySQL databases in bunch?

Answer

  1. Back up MySQL database files on destination server in C:\Program Files (x86)\Parallels\Plesk\Databases\MySQL\data

  2. Back up all MySQL databases on the source server, for example:

    C:\Program Files (x86)\Parallels\Plesk\MySQL\bin>for /f %i in (C:\mys\1.txt) do mysqldump -uadmin -p"*************" -P3306 %i > C:\mys\%i.sql
  3. Create the databases on the destination server and restore them:

    for /f %i in (C:\\mys\\1.txt) do mysql -uadmin -p"***********" -P3306 -e"create database %i";

    C:\Program Files (x86)\Parallels\Plesk\MySQL\bin>for /f %i in (C:\mys\1.txt) do mysql -uadmin -p"************" -P3306 %i < C:\mys\%i.sql
Have more questions? Submit a request
Please sign in to leave a comment.