Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. mysql database backup from server to the local machine

mysql database backup from server to the local machine

Scheduled Pinned Locked Moved ASP.NET
csharpasp-netdatabasemysqlsysadmin
7 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sbua
    wrote on last edited by
    #1

    Hi, I have to take backup of the mysql database from the server to local machine database using asp.net 2.0. I have established the connection to the server database using the server name,username,password. Now i need to connect the local machine database. I have used the server name as 'localhost',username'root',pwd 'root' But its not establishing the connection to the local machine when i upload the code in the server. Can Anyone give me an idea how to connect to the local machine. Thanks

    C R 2 Replies Last reply
    0
    • S sbua

      Hi, I have to take backup of the mysql database from the server to local machine database using asp.net 2.0. I have established the connection to the server database using the server name,username,password. Now i need to connect the local machine database. I have used the server name as 'localhost',username'root',pwd 'root' But its not establishing the connection to the local machine when i upload the code in the server. Can Anyone give me an idea how to connect to the local machine. Thanks

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      sbua wrote:

      But its not establishing the connection to the local machine when i upload the code in the server.

      um... You're using localhost, because your DB is local to you, but you're running the code on the server ? Have I got it wrong, or is this a joke ?

      Christian Graus Driven to the arms of OSX by Vista.

      S 1 Reply Last reply
      0
      • C Christian Graus

        sbua wrote:

        But its not establishing the connection to the local machine when i upload the code in the server.

        um... You're using localhost, because your DB is local to you, but you're running the code on the server ? Have I got it wrong, or is this a joke ?

        Christian Graus Driven to the arms of OSX by Vista.

        S Offline
        S Offline
        sbua
        wrote on last edited by
        #3

        Hi, I tried to take the backup of mysql server database to my local database. I dont know how to do this. Could you please give me an idea to implement this. Thanks

        N 1 Reply Last reply
        0
        • S sbua

          Hi, I tried to take the backup of mysql server database to my local database. I dont know how to do this. Could you please give me an idea to implement this. Thanks

          N Offline
          N Offline
          N a v a n e e t h
          wrote on last edited by
          #4

          Where is this ASP.NET application running? Server or your local machine? If it is on server, you are out of luck. :)

          Navaneeth How to use google | Ask smart questions

          S 1 Reply Last reply
          0
          • N N a v a n e e t h

            Where is this ASP.NET application running? Server or your local machine? If it is on server, you are out of luck. :)

            Navaneeth How to use google | Ask smart questions

            S Offline
            S Offline
            sbua
            wrote on last edited by
            #5

            Hi, Asp.net application is running in the server. How to take my server db backup to the local machine Thanks

            N 1 Reply Last reply
            0
            • S sbua

              Hi, Asp.net application is running in the server. How to take my server db backup to the local machine Thanks

              N Offline
              N Offline
              N a v a n e e t h
              wrote on last edited by
              #6

              You have no idea about how things works. How are you expecting the application running on a remote server can communicate with your local machine?

              Navaneeth How to use google | Ask smart questions

              1 Reply Last reply
              0
              • S sbua

                Hi, I have to take backup of the mysql database from the server to local machine database using asp.net 2.0. I have established the connection to the server database using the server name,username,password. Now i need to connect the local machine database. I have used the server name as 'localhost',username'root',pwd 'root' But its not establishing the connection to the local machine when i upload the code in the server. Can Anyone give me an idea how to connect to the local machine. Thanks

                R Offline
                R Offline
                Ranjit Viswakumar
                wrote on last edited by
                #7

                This is a tricky question. You can use wscript to run shell commands and get this done.

                Dim oShell
                Set oShell = CreateObject("WScript.Shell")
                oShell.run "cmd /C " & strMYLocation & "mysqldump -B " & dbname & " -u " & strMYUser & " -p" & strMYpassword & " > " & strMYBackup & "dbBkup" & strBackup & dbname & ".sql",,true

                Set oShell = Nothing

                Make sure to grant read/execute/write permissions to the IUSR account over all the involved files and folders. Good luck!

                Ranjit Viswakumar Professional Services Specialist http://hostmysite.com/?utm\_source=bb

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups