Professional Web Applications Themes

Looking for best way to sync data structure - MySQL

Howdy, I'm looking for a good tool to use (can be nothing more than a script...) to sync database structure from one DB to another. Best case scenario is that it would generate a .sql script file to run against the target DB. (I'm running mySQL 5.x) I am mainly running OS X, but I have access to windows machines. Is there a standard tool/script out there to do this? I've tried using Navicat for OSX with limited success. Thanks, Jason...

  1. #1

    Default Looking for best way to sync data structure

    Howdy,

    I'm looking for a good tool to use (can be nothing more than a
    script...) to sync database structure from one DB to another. Best
    case scenario is that it would generate a .sql script file to run
    against the target DB.
    (I'm running mySQL 5.x)

    I am mainly running OS X, but I have access to windows machines.

    Is there a standard tool/script out there to do this?

    I've tried using Navicat for OSX with limited success.

    Thanks,
    Jason

    jreljac@gmail.com Guest

  2. #2

    Default Re: Looking for best way to sync data structure

    com wrote: 

    mysqldump, comes with mysql, run it in the OSX terminal.

    On the machine where you want to import the .sql file you only need the
    console front end (mysql) where you can import it with \,

    --

    //Aho
    J.O. Guest

  3. #3

    Default Re: Looking for best way to sync data structure

    On Jun 3, 10:43 am, "J.O. Aho" <net> wrote: 


    >
    > mysqldump, comes with mysql, run it in the OSX terminal.
    >
    > On the machine where you want to import the .sql file you only need the
    > console front end (mysql) where you can import it with \,
    >
    > --
    >
    > //Aho[/ref]

    Thanks...

    I do use mysqldump when creating new DBs, but will it let me sync
    structure?
    Lets say I have 2 DBs, A &B.
    A has three tables - 1,2 and 3 while B has 2 tables - 1 & 3
    I need to be able to compare the two DBs and create a script to
    generate table #2 in DB B
    (I need this down to the column level)

    Thanks,
    Jason

    jreljac@gmail.com Guest

  4. #4

    Default Re: Looking for best way to sync data structure

    com wrote:
     

    The dump will create a copy of the original database/table, including the data.

     

    If you want only inject data missing, mysqldump won't be the optimal, even if
    you could dump the both databases and then use the diff command to get the
    difference between the tables and then use the result.

    In a such case it could be easier just write a small php script that will read
    each line on one database and check if that on is in the other, if not, do an
    INSERT.
    MysqlAdmin may have such functionality, but not sure as I don't use that so much.


    --

    //Aho
    J.O. Guest

Similar Threads

  1. data structure from XML::LibXML
    By Dave Roe in forum PERL Modules
    Replies: 2
    Last Post: October 8th, 02:26 AM
  2. XML-Structure and Panel Data
    By Ulf_Schreiber@adobeforums.com in forum Adobe Indesign Windows
    Replies: 0
    Last Post: June 25th, 11:18 AM
  3. Structure Data Types
    By Donald Nova in forum ASP.NET Web Services
    Replies: 0
    Last Post: March 2nd, 01:20 PM
  4. what is this data structure?
    By Jack Chen in forum PERL Beginners
    Replies: 10
    Last Post: February 6th, 05:54 AM
  5. data structure help
    By James E Keenan in forum PERL Miscellaneous
    Replies: 0
    Last Post: August 9th, 06:47 PM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139