Transferring a MySQL database from local PC onto an ISP server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • aa

    Transferring a MySQL database from local PC onto an ISP server

    If I have an MySQL database on my local w2k, how do I transfer it onto my
    ISP server?
    The ISP gave me the name of an empty MySQL database they set up for me, the
    username and the password with no further explanations.
    I came here from ASP/Access where I was just uploading a mdb file into my
    webspace.
    But with MySQL there should be a different procedure, should it not?


  • Michael Vilain

    #2
    Re: Transferring a MySQL database from local PC onto an ISP server

    In article <418fde59$0$336 16$ed2619ec@ptn-nntp-reader02.plus.n et>,
    "aa" <aa@virgin.ne t> wrote:
    [color=blue]
    > If I have an MySQL database on my local w2k, how do I transfer it onto my
    > ISP server?
    > The ISP gave me the name of an empty MySQL database they set up for me, the
    > username and the password with no further explanations.
    > I came here from ASP/Access where I was just uploading a mdb file into my
    > webspace.
    > But with MySQL there should be a different procedure, should it not?[/color]

    Read the man page for mysqldump, which should be on your system if you
    installed MySQL. And do some selected reading on MySQL from whatever
    books work for you. I like the O'Reilly books and articles:




    --
    DeeDee, don't press that button! DeeDee! NO! Dee...



    Comment

    • Michael Fesser

      #3
      Re: Transferring a MySQL database from local PC onto an ISP server

      .oO(aa)
      [color=blue]
      >If I have an MySQL database on my local w2k, how do I transfer it onto my
      >ISP server?[/color]

      Assuming you have shell-access to the server:

      1) On your local machine, command line:

      mysqldump -uUsername -pPassword Database > backup.sql

      2) Upload the file backup.sql.

      3) On the remote machine, command line:

      mysql -uUsername -pPassword Database < backup.sql

      Micha

      Comment

      • aa

        #4
        Re: Transferring a MySQL database from local PC onto an ISP server

        > 3) On the remote machine, command line:[color=blue]
        > mysql -uUsername -pPassword Database < backup.sql[/color]

        How do I do that on my ISP's remote machine?


        Comment

        • Michael Fesser

          #5
          Re: Transferring a MySQL database from local PC onto an ISP server

          .oO(aa)
          [color=blue][color=green]
          >> 3) On the remote machine, command line:
          >> mysql -uUsername -pPassword Database < backup.sql[/color]
          >
          >How do I do that on my ISP's remote machine?[/color]

          You need a shell account on that server.

          If you're not able to login to the server using a secure shell (SSH) for
          example you have to find another way. You could use phpMyAdmin or set up
          a simple script that executes the command on the server.

          XCIV. Program Execution Functions


          Micha

          Comment

          • aa

            #6
            Re: Transferring a MySQL database from local PC onto an ISP server

            I made some search.
            If you mean that on my local machine from the command line I enter
            mysql -h name_of_the_rem ote_host -u my_username -p

            then it indeed asks for a pw, which means that it recognised the server
            name. Howver after I ebter the pw, an error 2003 is returned:
            Can't connect to MySQL server on name_of_the_rem ote_host (10060)

            What should I do about it?


            Comment

            • Michael Fesser

              #7
              Re: Transferring a MySQL database from local PC onto an ISP server

              .oO(aa)
              [color=blue]
              >I made some search.
              >If you mean that on my local machine from the command line I enter
              >mysql -h name_of_the_rem ote_host -u my_username -p
              >
              >then it indeed asks for a pw, which means that it recognised the server
              >name. Howver after I ebter the pw, an error 2003 is returned:
              >Can't connect to MySQL server on name_of_the_rem ote_host (10060)[/color]

              That's how it's supposed to be. A database server on a public host
              should not be accessible from remote machines.
              [color=blue]
              >What should I do about it?[/color]

              First question: Are you able to login to the remote machine using SSH or
              PuTTY or something like that? If unsure check with your host, maybe they
              have a FAQ section.

              Micha

              Comment

              • aa

                #8
                Re: Transferring a MySQL database from local PC onto an ISP server

                > First question: Are you able to login to the remote machine using SSH or[color=blue]
                > PuTTY or something like that?[/color]

                Never heard of PuTTY or SSH - will check and revert


                Comment

                Working...