Link to home
Start Free TrialLog in
Avatar of Pyromanci
PyromanciFlag for United States of America

asked on

MySQL Replication Between Major versions

Hello Experts,

I have a rather interesting problem (or at least it is interesting to me). I have a MySQL 4.1 server I am restricted to that version because it is required by our POS (point of sales) software. See i want to utilize triggers to aid in some integration with our website and email marketing company. Though the fact that triggers aren't available unless your using version 5.0 or newer sort of hurts things.

 Now that's what I'm wanting to do and here is what i've tired:

I figured for giggles i would just setup a master/slave replication between 4.1 and 5.0. Unfortunately the servers weren't replicating. I can only assume that they were because of a skip-name-resolve defined in the 4.1 server config file. Now the reason that is there is because the server was throwing a fit by the fact there is second network attach to the machine with no gateway it's just a cross over cable between it's self and it's network based raid 1 server for fail over.

So at this point i'm at a loss. on how i can achieve my end result. There are things i need to do instantly when a row is updated/inserted into certain tables with in our POS database. Anyone have ideas?
Avatar of snoyes_jw
snoyes_jw
Flag of United States of America image

Replication is not instant, so don't rely on it if that's what you need. Replication requires a TCP connection.
Avatar of Pyromanci

ASKER

I know replication isn't instant, reason why I said it wasn't is the the fact i waited over a day and a single cell didn't replicate over (and yes i know how to set up replication I have it running for another project).

Let alone i am not even sure replication is what i need to do, because i have no clue if the triggers will remain if i added them in.

The triggers will remain on the slave, and get fired, if you don't drop and recreate the tables on the master - those tables would get dropped and recreated without the triggers on the slave.

The bigger problem is the number of things that changed between the various versions - there are several statements that will cause syntax errors on the later version, even though they succeed on the earlier version (changes in reserved words, in the precedence of the comma operator and the JOIN keyword, handling of auto_increment values in INSERT...ON DUPLICATE KEY statements, to name a few).
I know there would be some issues because the fact its a major version, but i just wasn't sure if this would be the ideal solution  for what i want to accomplish. Which is:
"There are things i need to do instantly when a row is updated/inserted into certain tables with in our POS database."

And even if it is not exactly that instant as long as it is with in 1-10minutes of it happening I can live with it.
ASKER CERTIFIED SOLUTION
Avatar of Pyromanci
Pyromanci
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial