开发者

MySQL (5.x) database backup/restore to file tool

Welcome, I'm looking for php class what allow me to backup MySQL (5.x) databases under PHP.

I test many from phpclasses but most all are written for mysql 4 and under mysql5, generate wrong code.

  • Class should allow me to dump my database into file.
  • easy restore that file.
  • generated开发者_高级运维 file (.sql) should be compatible with phpmyadmin.


You will get better results using mysqldump as compared to phpMyAdmin's SQL Export especially when dealing with large databases and large strings of data

as @Dan mentioned, use exec() or shell_exec() to run the mysqldump command


MySQL has its own dump and import abilities. You can simply call use the mysqldump and mysql clients already installed on your server. If you want to wrap that functionality in a PHP script, build the commands as strings and use exec() or shell_exec() to run them on the system.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜