筆記搬遷
1、MYSQL對INT和VACHAR很敏感,尤其是MYSQL5.7。比如:between '1' and '5'
,我查出來的是空,可 between 1 and 5
,數據纔出來
2、int 與 vachar (mysql類型轉換後無法使用索引)
日期存儲 `report_date` char (如 20170325)
where `report_date` = 20170325 (索引用不到)
where `report_date` = '20170325' (索引可用到【必須是字符串類型】)
3、複製粘貼專用(自用)
mysql
grant all privileges on *.* to stone@"%" identified by "lover";
firewall
firewall-cmd --permanent --add-port=9501/tcp
內存/CPU 佔用 top 10
ps aux|head -1; ps aux | sort -k4nr | head -10
ps aux|head -1;ps aux|grep -v PID|sort -rn -k +3|head
nginx設置密碼
htpasswd -c -d /usr/local/nginx/conf/vhost/static_pass username
location ~ /admin {
auth_basic "Restricted";
auth_basic_user_file /usr/local/nginx/conf/vhost/static_pass;//請使用絕對路徑
root /home/www/admin; //host 地址,不然認證通過之後,找不到對應的文件
}