📜  mariadb 将数据库克隆到另一个名称 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:02.938000             🧑  作者: Mango

代码示例1
// if you didnt create the target db, do it:
mysql -u your_user -p

> CREATE DATABASE the_db_cloned_name;
> SHOW DATABASES

// then check if it is created and so you're ready to proceed
mysqldump -u your_user -p the_db_name > /directory/file_name.sql
mysql -u your_user -p the_db_cloned_name < /directory/file_name.sql