Professional Web Applications Themes

binary compatibility between different versions of MySQL? - MySQL

OK, what is supposed to happen in this situation? We have a mysqldump of a database. We restore it on two different mysql servers, one running 5.0, one running the latest in the 4.0.x series. MyISAM tables on both. We then stop both servers, and do myisamchk on each. They are both happy. We then copy the MYI and MYD files from each server to a temp directory on the other, and check them again, so that we are using the 5.0 myisamchk to check tables created by the 4.0 server, and vice versa. Each reports that the tables have ...

  1. #1

    Default binary compatibility between different versions of MySQL?

    OK, what is supposed to happen in this situation? We have a mysqldump of a
    database. We restore it on two different mysql servers, one running 5.0,
    one running the latest in the 4.0.x series. MyISAM tables on both.

    We then stop both servers, and do myisamchk on each. They are both happy.

    We then copy the MYI and MYD files from each server to a temp directory on
    the other, and check them again, so that we are using the 5.0 myisamchk to
    check tables created by the 4.0 server, and vice versa.

    Each reports that the tables have bad indexes and are corrupt.

    I thought that MyISAM tables were binary compatable across versions of
    MySQL?

    Does this mean that when settup tion from a master to a slave, where
    the slave is running a later version of mysql, that after taking the
    snapshot on the master, it needs to by myisamchk'ed on the slave before
    being used?

    --
    --Tim Smith
    Tim Smith Guest

  2. #2

    Default Re: binary compatibility between different versions of MySQL?

    Tim Smith wrote:
    > OK, what is supposed to happen in this situation? We have a mysqldump of a
    > database. We restore it on two different mysql servers, one running 5.0,
    > one running the latest in the 4.0.x series. MyISAM tables on both.
    >
    > We then stop both servers, and do myisamchk on each. They are both happy.
    >
    > We then copy the MYI and MYD files from each server to a temp directory on
    > the other, and check them again, so that we are using the 5.0 myisamchk to
    > check tables created by the 4.0 server, and vice versa.
    >
    What made you think you could do this?
    > Each reports that the tables have bad indexes and are corrupt.
    >
    > I thought that MyISAM tables were binary compatable across versions of
    > MySQL?
    Why would you think so? It's never been doented to be the case.
    >
    > Does this mean that when settup tion from a master to a slave, where
    > the slave is running a later version of mysql, that after taking the
    > snapshot on the master, it needs to by myisamchk'ed on the slave before
    > being used?
    >
    You just can't copy files from one server to another.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    [email]jstucklexattglobal.net[/email]
    ==================
    Jerry Stuckle Guest

  3. #3

    Default Re: binary compatibility between different versions of MySQL?

    In article <RtOdnSiS7--ykhPZnZ2dnUVZ_v6dnZ2dcomcast.com>, Jerry Stuckle
    wrote:
    >> We then copy the MYI and MYD files from each server to a temp directory
    >> on the other, and check them again, so that we are using the 5.0
    >> myisamchk to check tables created by the 4.0 server, and vice versa.
    >>
    >
    > What made you think you could do this?
    One of my IT guys said he read that you could. :-) Doing some checking, it
    looks like you can from 3.23.x to 4.0, but are supposed to dump and restore
    if you have to go from 4.0 to 4.1, and 4.1 to 5.0. 5.0 and 5.1 are
    compatible.

    ....
    > You just can't copy files from one server to another.
    Well, the procedure given in the manual for setting up tion suggests
    doing just that. Flush tables with read lock, make a tarball of the mysql
    directory, copy to the new slave, unpack the tarball into the mysql
    directory.

    --
    --Tim Smith
    Tim Smith Guest

  4. #4

    Default Re: binary compatibility between different versions of MySQL?

    >OK, what is supposed to happen in this situation? We have a mysqldump of a
    >database. We restore it on two different mysql servers, one running 5.0,
    >one running the latest in the 4.0.x series. MyISAM tables on both.
    >
    >We then stop both servers, and do myisamchk on each. They are both happy.
    >
    >We then copy the MYI and MYD files from each server
    DO NOT copy MYI and MYD files, unless the sole purpose is to create
    I/O and network load.
    >to a temp directory on
    >the other, and check them again, so that we are using the 5.0 myisamchk to
    >check tables created by the 4.0 server, and vice versa.
    >Each reports that the tables have bad indexes and are corrupt.
    >
    >I thought that MyISAM tables were binary compatable across versions of
    >MySQL?
    Do not copy .MYI and .MYD files from one system to another using the
    SAME version of MySQL. Or worse, a different one.
    >Does this mean that when settup tion from a master to a slave, where
    >the slave is running a later version of mysql, that after taking the
    >snapshot on the master,
    You take the snapshot with mysqldump, not cp, tar, ftp, or any other
    file copy program.

    Gordon L. Burditt
    Gordon Burditt Guest

  5. #5

    Default Re: binary compatibility between different versions of MySQL?

    Tim Smith <reply_in_groupmouse-potato.com> wrote:
    >
    > We then copy the MYI and MYD files from each server to a temp directory on
    > the other, and check them again, so that we are using the 5.0 myisamchk to
    > check tables created by the 4.0 server, and vice versa.
    >
    > Each reports that the tables have bad indexes and are corrupt.
    This is correct.
    > I thought that MyISAM tables were binary compatable across versions of
    > MySQL?
    Nope. MyISAM data files (.MYD) are compatible across different MySQL
    versions and platforms. MyISAM indexes are compatible across platforms
    but only compatible across MySQL instances of the same major version
    using exactly the same settings for chts/collations/stopwords etc.

    Between 4.0 and 5.0 (that is: exactly in 4.1) MySQL changed a lot of
    things around character sets and collations. It is hence neccessary
    to check and recreate indexes. Read it here:

    [url]http://dev.mysql.com/doc/refman/4.1/en/upgrading-from-4-0.html[/url]
    > Does this mean that when settup tion from a master to a slave, where
    > the slave is running a later version of mysql, that after taking the
    > snapshot on the master, it needs to by myisamchk'ed on the slave before
    > being used?
    Yes. The recommended way to exchange data between different MySQL
    versions is to use mysqldump. To initially seed an tion slave
    you can also use LOAD TABLE FROM MASTER.


    XL
    --
    Axel Schwenke, Senior Software Developer, MySQL AB

    Online User Manual: [url]http://dev.mysql.com/doc/refman/5.0/en/[/url]
    MySQL User Forums: [url]http://forums.mysql.com/[/url]
    Axel Schwenke Guest

  6. #6

    Default Re: binary compatibility between different versions of MySQL?

    Tim Smith wrote:
    > In article <RtOdnSiS7--ykhPZnZ2dnUVZ_v6dnZ2dcomcast.com>, Jerry Stuckle
    > wrote:
    >
    >>>We then copy the MYI and MYD files from each server to a temp directory
    >>>on the other, and check them again, so that we are using the 5.0
    >>>myisamchk to check tables created by the 4.0 server, and vice versa.
    >>>
    >>
    >>What made you think you could do this?
    >
    >
    > One of my IT guys said he read that you could. :-) Doing some checking, it
    > looks like you can from 3.23.x to 4.0, but are supposed to dump and restore
    > if you have to go from 4.0 to 4.1, and 4.1 to 5.0. 5.0 and 5.1 are
    > compatible.
    >
    So? You can find almost anything on the internet. This was never officially
    supported nor endorsed by MySQL, AFAIK. You can try it - but you're on your own.
    > ...
    >
    >>You just can't copy files from one server to another.
    >
    >
    > Well, the procedure given in the manual for setting up tion suggests
    > doing just that. Flush tables with read lock, make a tarball of the mysql
    > directory, copy to the new slave, unpack the tarball into the mysql
    > directory.
    >
    Yes - when you're running THE SAME VERSIONS!


    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    [email]jstucklexattglobal.net[/email]
    ==================
    Jerry Stuckle Guest

Similar Threads

  1. Compatibility between CS3 and earlier versions?
    By Gareth in forum Macromedia Contribute General Discussion
    Replies: 2
    Last Post: May 23rd, 10:22 PM
  2. Replies: 1
    Last Post: January 7th, 07:37 PM
  3. backwards compatibility between acrobat 6 and lower versions
    By Susanne_Baker@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 2
    Last Post: May 3rd, 02:51 PM
  4. Mysql and binary data insert
    By Michal Weinfurtner in forum PERL Beginners
    Replies: 1
    Last Post: October 22nd, 12:46 PM
  5. Binary Compatibility
    By C in forum ASP Components
    Replies: 2
    Last Post: July 2nd, 09:21 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