复制整个MySQL数据库 [英] Duplicate Entire MySQL Database
本文介绍了复制整个MySQL数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以在linux服务器上复制整个MySQL数据库吗?
我知道我可以使用导出和导入,但原始数据库是> 25MB,所以不是
解决方案
是否可以使用mysqldump或直接复制数据库文件? div>
首先创建重复数据库:
CREATE DATABASE duplicateateddb;
确保用户和权限都已到位,并且:
mysqldump -u admin -p originaldb | mysql -u backup -pPassword duplicateateddb;
Is it posible to duplicate an entire MySQL database on a linux server?
I know I can use export and import but the original database is >25MB so that's not ideal.
Is it possible using mysqldump or by directly duplicates the database files?
解决方案
First create the duplicate database:
CREATE DATABASE duplicateddb;
Make sure the user and permissions are all in place and:
mysqldump -u admin -p originaldb | mysql -u backup -pPassword duplicateddb;
这篇关于复制整个MySQL数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文