replicate a database

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    #1

    replicate a database

    both of 2 servers are MySQL.

    how can I replicate a database to one server from another?

    until now I zip the database folder and I extract the zip file in other
    MySQL server.

    But now I haven't permission to do this in Linux, instead I have admin
    permision in MySQL.

    One server run in WinXP (local) and one in the Linux (remote)


  • Aggro

    #2
    Re: replicate a database

    <- Chameleon -> wrote:[color=blue]
    > both of 2 servers are MySQL.
    >
    > how can I replicate a database to one server from another?
    >
    > until now I zip the database folder and I extract the zip file in other
    > MySQL server.
    >
    > But now I haven't permission to do this in Linux, instead I have admin
    > permision in MySQL.
    >
    > One server run in WinXP (local) and one in the Linux (remote)[/color]

    Create dump of the database:
    mysqldump -u username databasename > database_dump.s ql

    Dump it into the target machine:
    ( Note this requires that you have _empty_ database called databasename
    on the target machine. And you have rights to that. )
    mysql -u username databasename < database_dump.s ql


    If you have a password for username, use -p parameter with mysqldump and
    mysql.

    Comment

    • Aggro

      #3
      Re: replicate a database

      <- Chameleon -> wrote:[color=blue]
      > both of 2 servers are MySQL.
      >
      > how can I replicate a database to one server from another?
      >
      > until now I zip the database folder and I extract the zip file in other
      > MySQL server.
      >
      > But now I haven't permission to do this in Linux, instead I have admin
      > permision in MySQL.
      >
      > One server run in WinXP (local) and one in the Linux (remote)[/color]

      Create dump of the database:
      mysqldump -u username databasename > database_dump.s ql

      Dump it into the target machine:
      ( Note this requires that you have _empty_ database called databasename
      on the target machine. And you have rights to that. )
      mysql -u username databasename < database_dump.s ql


      If you have a password for username, use -p parameter with mysqldump and
      mysql.

      Comment

      • D. Pickering

        #4
        Re: replicate a database

        using the load data command.
        eg.

        load data infile '/tmp/datastuff.csv' into table tabname fields terminated
        by ',' enclosed by '"' ;

        dp

        "<- Chameleon ->" <cham_gss@hotma il.NOSPAM.com> wrote in message
        news:bomf7c$649 $1@nic.grnet.gr ...[color=blue]
        > both of 2 servers are MySQL.
        >
        > how can I replicate a database to one server from another?
        >
        > until now I zip the database folder and I extract the zip file in other
        > MySQL server.
        >
        > But now I haven't permission to do this in Linux, instead I have admin
        > permision in MySQL.
        >
        > One server run in WinXP (local) and one in the Linux (remote)
        >
        >[/color]


        Comment

        • D. Pickering

          #5
          Re: replicate a database

          using the load data command.
          eg.

          load data infile '/tmp/datastuff.csv' into table tabname fields terminated
          by ',' enclosed by '"' ;

          dp

          "<- Chameleon ->" <cham_gss@hotma il.NOSPAM.com> wrote in message
          news:bomf7c$649 $1@nic.grnet.gr ...[color=blue]
          > both of 2 servers are MySQL.
          >
          > how can I replicate a database to one server from another?
          >
          > until now I zip the database folder and I extract the zip file in other
          > MySQL server.
          >
          > But now I haven't permission to do this in Linux, instead I have admin
          > permision in MySQL.
          >
          > One server run in WinXP (local) and one in the Linux (remote)
          >
          >[/color]


          Comment

          Working...