MySQL Replication

677 views
622 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
677
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
21
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

MySQL Replication

  1. 1. Replication-Why-How?<br />---MySQL 4 Oracle DBAseries<br />苏普<br />2010-3<br />1<br />
  2. 2. No redo! No undo!<br />>UPDATE life SET happy="always" WHERE nick="supu";<br />SQL Plan<br />Storage Engines<br />>OK! OR Error<br />
  3. 3. How to log<br />MySQL Logs the SQL(binary)<br />UPDATE life SET happy="always" WHERE nick="supu";<br />Storage Enginescan log<br />
  4. 4. Whatlog look like<br /># at 323<br />#100308 21:09:04 server id 1 end_log_pos 486 Query thread_id=591 exec_time=0 error_code=0<br />SET TIMESTAMP=1268053744/*!*/;<br />update sns_users_0001 set nick=rpad('',20,md5(rand())),gmt_modified=now() where user_id = 34<br />Whenlog<br />AftereverySQLdone<br />
  5. 5. Logic Replication is possible<br />
  6. 6. What is Replication<br />
  7. 7. What is Replication<br />
  8. 8. Feature<br />Logical<br />There is no guarantee about data<br />Asynchronous<br />Delay<br />Still, It works Fine<br />
  9. 9. How to config<br />Principle<br />Copy all data && Mark the pos of log<br />Google: MySQL Replicaition<br />NoDBA[Not only dba]<br />
  10. 10. Wish you a peaceful life<br />

×