从MySQL到MySQL用PHP克隆 [英] MySQL to MySQL clone with PHP
本文介绍了从MySQL到MySQL用PHP克隆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
谁知道一个PHP脚本会将一个完整的MySQL数据库克隆到另一台服务器上的另一个数据库中?作为一种备份?
Anyone know of a PHP script that will clone an entire MySQL database to another on another server? As a sort of backup?
推荐答案
您将运行
mysqldump -q -C --databases mydatabase | mysql -C -h othermachine
在这些命令中添加适当的标志,以指定凭据等.
Add the appropriate flags to these commands for specifying credentials, etc.
这篇关于从MySQL到MySQL用PHP克隆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文