mysql bin日誌配置及查看

來源:互聯網
上載者:User

標籤:update   /var   開始時間   設定   var   server   ``   begin   int   

mysql執行sql可以通過設定mysql bin 日誌進行記錄查看,mysql bin日誌配置如下: log_bin:onlog_bin_basename:bin檔案路徑及名首碼(/var/log/mysql/mysql-bin)log_bin_index:bin檔案index(/var/log/mysql/mysql-bin.index)server_id:n 產生的bin日誌如:mysql-bin.000000  mysql-bin.000001 通過mysqlbinlog mysql-bin.000000 > mysql-bin.000000.txt 轉換格式日誌內容: 
use `aayongche`/*!*/;SET TIMESTAMP=1485064811/*!*/; //開始時間insert into `users` (`userId`, `userName`) values (‘28396‘, ‘helly‘) //操作sql/*!*/;# at 38524047#170122 14:00:11 server id 1  end_log_pos 38524078 CRC32 0xe8f99830     Xid = 23583291  //伺服器idCOMMIT/*!*/;# at 38524078#170122 14:00:22 server id 1  end_log_pos 38524167 CRC32 0x64c7f33a     Query    thread_id=63112    exec_time=0    error_code=0SET TIMESTAMP=1485064822/*!*/;BEGIN/*!*/;# at 38524167#170122 14:00:22 server id 1  end_log_pos 38524482 CRC32 0x3ff38ff2     Query    thread_id=63112    exec_time=0    error_code=0SET TIMESTAMP=1485064822/*!*/;users update `` set `userName` = ‘heheli‘ where `userId` = ‘28396‘/*!*/;# at 38524482

 

mysql bin日誌配置及查看

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.