문제

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