SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Backup MySQL using ASP.Net C#

    Hi guys, I followed the code written on this certain site - Mysql backup using c#, the function create successfully a backup file but unfortunately it does not create any query of database or tables. Can anyone help me regarding this matter. Thank you so much.

  2. #2
    SitePoint Evangelist
    Join Date
    Jun 2007
    Location
    North Yorkshire, UK
    Posts
    483
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code is using mysqldump so the parameters relating to that utility apply. The parameters are put together on the line

    string cmd = string.Format(@"-u{0} -p{1} -h{2} {3}", "root", "root", "localhost", DBName);

    Your want to include a -R which means "Included stored routines (procedures and functions) for the dumped databases in the output"

    so the statement becomes

    string cmd = string.Format(@"-u{0} -p{1} -h{2} -R {3}", "root", "root", "localhost", DBName);

  3. #3
    SitePoint Addict
    Join Date
    Nov 2005
    Posts
    396
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    another thing, why is it that this thread that I started can also be seen in this link Backup MySQL using ASP.Net C# | Flip Forum

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,323
    Mentioned
    63 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by sirGE View Post
    another thing, why is it that this thread that I started can also be seen in this link Backup MySQL using ASP.Net C# | Flip Forum
    because apparently that site is scraping the web

    i'll flag this thread and ask sitepoint headquarters to look into it -- they have lawyers for this type of theft
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MySQL :: Re: Any One know that how to take Backup From ASP.NET with C# for MySQL for a WebApplication ?

    Basically you need to call mysqldump.exe to make sql script for your database

    Process.Start("Path \mysqldump.exe", "--user=user --password= password --host=server --databases Database Name -r ""path\filename.sql""")

    DB Backup
    http://www.fla-shop.com - Interactive maps for websites
    Flash Maps for web developers


Bookmarks

Posting Permissions

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