Solved

MySQL Replication Between Major versions

Posted on 2009-07-01
5
336 Views
Last Modified: 2012-05-07
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?
0
Comment
Question by:Pyromanci
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 24756957
Replication is not instant, so don't rely on it if that's what you need. Replication requires a TCP connection.
0
 
LVL 5

Author Comment

by:Pyromanci
ID: 24757263
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.

0
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 24760340
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).
0
 
LVL 5

Author Comment

by:Pyromanci
ID: 24762508
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.
0
 
LVL 5

Accepted Solution

by:
Pyromanci earned 0 total points
ID: 24809687
Well, I found the problem. The problem was the sub version compatibility. 4.1.18 does not properly replicate to the version of 5.0 i had installed (5.0.18). I upgraded my slave machine to 5.0.83 and it replicated with no problems and the triggers do function properly.

So i guess if anyone else is doing something similar make sure to 5.0.83 for your slave if coming form 4.1.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question