Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MySQL運用とらぶるすとーり〜^2 / MySQL-Troubleshooting-Story

ichirin2501
September 02, 2016

MySQL運用とらぶるすとーり〜^2 / MySQL-Troubleshooting-Story

ichirin2501

September 02, 2016
Tweet

More Decks by ichirin2501

Other Decks in Technology

Transcript

  1. mysql> show table status like 'relword' \G *************************** 1. row

    *************************** Name: relword Type: MyISAM Row_format: Fixed Rows: 4294967295 Avg_row_length: 9 Data_length: 38654705655 Max_data_length: 38654705663 Index_length: 106203639808 Data_free: 0 ..................... ݏͳ༧ײɺߦ਺ʂʁ 
  2. MySQL 4.0 -> 5.1 • (ඇޓ׵)char,varcharͷ௕͞ఆ͕ٛ
 όΠτ਺͔Βจࣈ਺΁มߋ(4.1 ~ • (ඇޓ׵)timestamp(n)ഇࢭ(4.1

    ~
 "20160830133257" -> "2016-08-30 13:32:57"
 ԼهͷΑ͏ʹจࣈྻͷ··ΞϓϦଆͰѻ͍ͬͯΔͱࢮ
 ྫ: http://anond.hatelabo.jp/20160830133257
 ͭΒ͍ɺ͕Μ͹Ζ͏ 
  3. Error reading packet from server: log event entry exceeded max_allowed_packet;

    Increase max_allowed_packet on master (server_errno=1236) max_allowed_packet ??? Τϥʔϩά ͓લ͸ԿΛݴ͍ͬͯΔΜͩ 
  4. binlog͕։͚ͳ͍ $ mysqlbinlog --no-defaults antennadb08-bin.4406 > dump.bin mysqlbinlog: Error reading

    file 'antennadb08-bin.4406' (Errcode: 22 - Invalid argument) ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 2964698656, event_type: -51 ERROR: Could not read entry at offset 549168893: Error in log format or read error. ERROR: Could not read entry at offset 549168893: Error in log format or read error. શεϨʔϒ͸549168893ͷϙδγϣϯͰఀࢭ DiskFullͰbinlogഁଛ 
  5. पลͷ bc 56 ͷσʔλྻΛ୳͢ 20bba7d5 = 549169109 ʹ timestamp master_log_file

    = "antennadb08-bin.4406" master_log_pos = 549169109 ΤϥʔͰϨϓϦఀࢭͯͨ͠backupDB͕͋ͬͨͷͰ
 CHANGE MASTER TO͢Ε͹ಈ͖ͦ͏