原创 centos mysql cpu_MySQL佔用CPU100%解決一例
一位同事負責的一套MySQL數據庫的CPU使用率達到100%,登上服務器top查看 Cpu(s): 95.9%us, 4.0%sy, 0.0%ni, 0.0%id, 20.0%wa, 0.0%hi, 0.0%si, 0.0%s
原创 PHP在日期計算時遇到31號減一個月還在當月
在使用PHP函數計算上一個月的日期時,發現當前日期如果是31號,例如:2019-12-31時,取上一個月的日期返的是219-12-01。 echo date('Y-m-d', strtotime('last month', strtotim