Вопрос

i am interested in a programmatic approach (from c++ application) to mysql database cloning. I was thinking something along invoking mysqldump remotely like:

mysqldump -u root -p --all-databases > C:\MySQL_Backup.sql

and then going back with:

mysql --user=root --password=password < c:\ MySQL_Backup.sql

the problem with the last command would be that it assumes the restored database must be called the same as the original - so this only really works for backup and restore but not in general for cloning databases.

What approach would be available for database cloning with mysql? btw, i am not really using mysql but MariaDB, but that should not matter

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top