Nginx和PHP的批處理腳本php
@echo off set PHP_FCGI_MAX_REQUESTS=1000 echo Starting PHP FastCGI... D:\server\RunHiddenConsole "D:\server\php\php-cgi.exe" -b 127.0.0.1:9000 -c "D:\server\php\php.ini" echo Starting nginx... D:\server\RunHiddenConsole "D:\server\nginx\nginx.exe" -p "D:\server\nginx"
@echo off echo Stopping nginx... taskkill /F /IM nginx.exe > nul echo Stopping PHP FastCGI... taskkill /F /IM php-cgi.exe > nul exit
@echo off echo Stopping nginx... taskkill /F /IM nginx.exe > nul echo Stopping PHP FastCGI... taskkill /F /IM php-cgi.exe > nul set PHP_FCGI_MAX_REQUESTS=1000 echo Starting PHP FastCGI... D:\server\RunHiddenConsole "D:\server\php\php-cgi.exe" -b 127.0.0.1:9000 -c "D:\server\php\php.ini" echo Starting nginx... D:\server\RunHiddenConsole "D:\server\nginx\nginx.exe" -p "D:\server\nginx"
server { listen 80; server_name 127.0.0.1; location / { root D:/WWW; autoindex on; index index.html index.htm index.php; autoindex_exact_size off; autoindex_localtime on; } location ~ \.php$ { root D:/WWW; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }
[mysql] # 設置mysql客戶端默認字符集 default-character-set=utf8 [mysqld] #skip-grant-tables #設置3306端口 port = 3306 # 設置mysql的安裝目錄 basedir=D:\server\mysql # 設置mysql數據庫的數據的存放目錄 datadir=D:\server\mysql\data # 容許最大鏈接數 max_connections=200 # 服務端使用的字符集默認爲8比特編碼的latin1字符集 character-set-server=utf8 # 建立新表時將使用的默認存儲引擎 default-storage-engine=INNODB # sql_mode sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
右鍵個人電腦 -> 屬性 -> 高級系統設置 -> 環境變量 ->從系統變量中找到Path
添加mysql目錄下的bin所在路徑到Path的末端(不要覆蓋Path原值,利用一個;號與上一個path路徑斷開):
html
輸入命令前端
mysqld -install
mysqld --initialize
net start mysql
mysql update mysql.user set authentication_string=password('root') where user='root'; #退出mysql exit
net stop mysql net start mysql
mysql -u root -p #輸入設置的密碼
SET PASSWORD = PASSWORD('your_new_password');
本文出自我的博客 最好的安排 轉載請註明出處!mysql