duanfeigui6655 2014-12-23 08:33
浏览 38
已采纳

我如何在lighttpd中执行mysqldump? 用php

I'm trying to export and import database in lighttpd using php. Mysqldump does not work as is:

$command= 'mysqldump -h localhost -u root -pXXXX db_name > backup.sql';
exec($command);
  • 写回答

2条回答 默认 最新

  • duandaotuo5542 2015-01-02 19:38
    关注

    I was using Palapa Webserver and it turns out the mysqldump application is not included. Sorry, should have checked this first and I also should have been clear that I was using Palapa Webserver.

    I just ended up using import and export functions that I found.

    Import:

    how to import .sql file in mysql database using php

    Export:

    http://davidwalsh.name/backup-mysql-database-php

    Thanks

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?