Solved

MySQL Replication Between Major versions

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction In this installment of my SQL tidbits, I will be looking at parsing Extensible Markup Language (XML) directly passed as string parameters to MySQL 5.1.5 or higher. These would be instances where LOAD_FILE (http://dev.mysql.com/doc/refm…
Creating and Managing Databases with phpMyAdmin in cPanel.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

820 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