How to backup client Mysql database manually?

Created:

2016-11-16 13:03:52 UTC

Modified:

2017-04-24 11:20:58 UTC

0

Was this article helpful?


Have more questions?

Submit a request

How to backup client Mysql database manually?

Applicable to:

  • Plesk for Windows

Question

How to backup client MySQL database manually?

Answer

If MySQL server is running, you can backup database with the following command:

C:> "%plesk_dir%"\\MySQL\\bin\\mysqldump -uadmin -p -P3306 client_base > client_base.dump

where

3306 - port for MySQL server
client_base is name of database
client_base.dump is name of backup database

You can restore it on another server with the following command:

C:> "%plesk_dir%"\\MySQL\\bin\\mysql -uadmin -p -P3306 client_base < client_base.dump

Please note that IT IS NOT CORRECT procedure to just copy folder with database name from 'C:\\Program Files (x86)\\Parallels\\Plesk\\Databases\\MySQL\\data\\' and move it to another server. In databases with InnoDB engine, data and indexes of innodb tables are stored in 'ibdata1' file. If you want to move database to another server you should either:

  1. Backup database through Plesk, download it and restore backup on another server.

  2. Manually dump data with 'mysqldump' command, as mentioned above, and restore backup on another server.

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