大数据量MySQL备份的PHP脚本

WBOY
Release: 2016-06-07 16:33:13
Original
1105 people have browsed it

代码: //备份脚本exec("{$cfg['bak']['mysqldump']} -u {$data['username']} --password={$data['password']} --default-character-set=gbk {$data['dbname']} {$fileName} ");//恢复脚本exec("{$cfg['bak']['mysql']} -u {$data['username']} --password={

代码:

//备份脚本 exec("{$cfg['bak']['mysqldump']} -u {$data['username']} --password={$data['password']} --default-character-set=gbk {$data['dbname']} > {$fileName} "); //恢复脚本 exec("{$cfg['bak']['mysql']} -u {$data['username']} --password={$data['password']} {$data['dbname']} 

直接使用 mysqldump 和 mysql, 这些专业工具的效率绝对是要比PHP写的代码效率高的多!!

声明: 本文采用 CC BY-NC-SA 3.0 协议进行授权

转载请注明来源:小景的博客

本文链接地址:http://www.phpv5.com/blog/archives/445/

Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!