Solved

MySQL Replication Between Major versions

Posted on 2009-07-01
5
322 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
  • 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Show results in columns vs rows 5 53
MySQL tables for vtiger CRM 4 40
PHP loop not working 4 32
mysql left join sentence 7 22
As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now