Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder UrbanTwitch's Avatar
    Join Date
    Apr 2006
    Posts
    485
    Thanks
    44
    Thanked 1 Time in 1 Post

    Exporting MySQL Tables

    Hello, I am making a news script and I need a way so people can create backups using .sql files.

    See, I need a script which will export a certain MySQL table into a .sql file wit the current data on it. Is that possible?
    Formerly MysticScript

    6+ years club

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,436
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

    Will that not do what you need???

  • #3
    Regular Coder UrbanTwitch's Avatar
    Join Date
    Apr 2006
    Posts
    485
    Thanks
    44
    Thanked 1 Time in 1 Post
    I need a php script that exports MySQL tables.

    Plus, I don't know what a shell is.
    Formerly MysticScript

    6+ years club

  • #4
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,963
    Thanks
    120
    Thanked 76 Times in 76 Posts
    shell is equivalet to windows dos prompt
    mysqldump is executable
    then you can wrap that into .bat or something, can be run from php I hope.
    Last edited by BubikolRamios; 02-23-2009 at 05:58 AM.

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,436
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    Bubikol is correct. If you are able to invoke executable programs from PHP, then that would be the way to do this.

    How hard that is--if it's even possible--probably depends on what operating system you are using.

  • #6
    Regular Coder UrbanTwitch's Avatar
    Join Date
    Apr 2006
    Posts
    485
    Thanks
    44
    Thanked 1 Time in 1 Post
    But is it possible to run a mysqldump on a web page using PHP?
    Formerly MysticScript

    6+ years club

  • #7
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,436
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    I don't know PHP well enough to be able to answer that.

    If it were ASP/ASP.NET on a Windows server, then the answer would be "it depends on what permissions/settings the web administrator has given you."

    I think maybe you could ask the question in a PHP forum. Be sure to specify exactly what operating system you are using. (That is, if Linux, be sure to say what "flavor" of Linux, etc.)


  •  

    Posting Permissions

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