PHP

Create / Export MySQL Database backup using PHP

  • ketan

    now where is restore?

    • Backup file is store in the same location of this executing php file.

  • Anastacio Robin

    hello this is working for me but how can I put the downloaded sql file in Documents folder??? 🙂

    • Hi,
      Downloaded sql file is store in the same location of the php file.
      I’ll explain how to create any number of size db backup file in few minutes using linux command+php in the next post.

      Regards

  • suraj

    excellent work

  • Gilbert Hanz

    Why? it’s can’t backup all tables?

    • call to the function with parameter $tables = ‘*’.
      this is getting all tables.

      thanks

      • ikiriyo riyoki

        Hi, I tried your codeigniter chat example. It works well but I’m having a problem. I can’t store and read messages when I try to enter chat on it. Do you know what’s the main problem of it? And btw, is it easy to attached an image in chat?

        • Hi,
          check the chat.js for correct path there entered. views>chat.php for correct db details.
          thanks

          • ikiriyo riyoki

            Thanks, I found already the error. It because my application has a permission. Now it works well, got another problem for now. Chat we’re working already but when I closed the chat box and reopened again, it doesn’t show the history of the chat.

          • ikiriyo riyoki

            I mean when I refresh the browser, the history will not be displayed.

  • Hari

    how to restore/import a database