近期出現一個問題很奇怪
後臺報出一個問題關於max_allowed_packet設置小了 我參照
http://www.2cto.com/database/201303/195830.html
的第二個方法解決了
但是第二天還是會出現
第二天這樣解決還是會出現這個問題
查找後發現有可能是設置過大導致mysql自動重啓,出於一種自動保護的原因
最後按照第一種方法解決 然後好了
查詢mysql日誌
mysql有以下幾種日誌: 錯誤日誌: -log-err 查詢日誌: -log 慢查詢日誌: -log-slow-queries 更新日誌: -log-update 二進制日誌: -log-bin 在mysql的安裝目錄下,打開my.ini,在後面加上上面的參數,保存後重啓mysql服務就行了。 例如:#Enter a name for the binary log. Otherwise a default name will be used. #log-bin=#Enter a name for the query log file. Otherwise a default name will be used. #log=#Enter a name for the error log file. Otherwise a default name will be used. log-error=#Enter a name for the update log file. Otherwise a default name will be used. #log-update= 上面只開啓了錯誤日誌,要開其他的日誌就把前面的“#”去掉 查看命令:①show variables like 'log_%';查看所有的log命令 ②show variables like 'log_bin';查看具體的log命令轉載:http://lj6684.iteye.com/blog/1520681