Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007
    Posts
    2

    Unanswered: Mysql backup using php script

    Hello

    I want to make php script which will take backup of mysql database. I dont want to use phpmyadmin, I want using it php script. Is it possible to execute mysqldump command using php?

    Thanks in advance

  2. #2
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    22
    Try

    PHP Code:
    System ("/usr/bin/mysqldump -u $dbuser -p$dbpasswd -h $dbhost $dbname > $path",$test); 

    Have a bit more sun in your heart

  3. #3
    Join Date
    Mar 2006
    Posts
    17
    You can also use exec() to run mysqldump.
    http://www.php.net/manual/en/ref.exec.php

    But I think you shouldn't include the password in there:
    http://dev.mysql.com/doc/refman/5.0/...-security.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •