開機啟動php,nginx,mysql服務
- 在/etc/rc.local中寫入
service php-fpm restart
service nginx restart
service mysqld restart
- 改php.ini,關閉zend opcache
- 改nginx.conf, sendfile off。
連接遠端mysql問題
vi /etc/sysconfig/iptables
// iptables配置端口白名單 (/)
-A INPUT -p tcp --dport 80 -j ACCEPT
永久關閉防火墻
chkconfig iptables off
重啟防火墻
service iptables restart
添加mysql用戶 '%',或者具體ip
mysql -uroot -p
grant all PRIVILEGES on *.* to '用戶名'@'ip地址或%' identified by '密碼';
use mysql;
select user,password,host from user; // 查看