zl程序教程

您现在的位置是:首页 >  数据库

当前栏目

FreeBSD 10 + Nginx 1.4.4 + PHP 5.5.9 + MySQL 5.6.15

mysqlPHPNginx 10 15 1.4 5.6 5.5
2023-09-14 08:59:51 时间

安装 MySQL server 与 client

 

pkg install mysql56-server

pkg install mysql56-client

 

设置mysql root密码

/usr/local/etc/rc.d/mysql-server onestart

/usr/local/bin/mysqladmin -u root password newpassword

 

FreeBSD 启动时开启MySQL服务

 

cat /etc/rc.conf EOF

mysql_enable="YES"

 

MySQL 启动脚本

# /usr/local/etc/rc.d/mysql-server

 

#log_format main $remote_addr - $remote_user [$time_local] "$request" # $status $body_bytes_sent "$http_referer" # "$http_user_agent" "$http_x_forwarded_for"; #access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; gzip on; include /usr/local/etc/nginx/conf.d/*.conf;

/usr/local/etc/nginx/conf.d/host.domain.conf

server {

 listen 80;

 server_name localhost;

 #charset koi8-r;

 #access_log logs/host.access.log main;

 location / {

 root /usr/local/www/nginx;

 index index.html index.php;

 #error_page 404 /404.html;

 # redirect server error pages to the static page /50x.html

 error_page 500 502 503 504 /50x.html;

 location = /50x.html {

 root /usr/local/www/nginx-dist;

 # proxy the PHP scripts to Apache listening on 127.0.0.1:80

 #location ~ \.php$ {

 # proxy_pass http://127.0.0.1;

 # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000

 location ~ \.php$ {

 root html;

 fastcgi_pass 127.0.0.1:9000;

 fastcgi_index index.php;

 fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx$fastcgi_script_name;

 include fastcgi_params;

 # deny access to .htaccess files, if Apaches document root

 # concurs with nginxs one

 #location ~ /\.ht {

 # deny all;


如何修复“PHP 安装缺少 WordPress 所需的 MySQL 扩展”的错误? 在WordPress建站,WordPress定制开发过程中,开发者容易遇见“您的 PHP 安装似乎缺少 WordPress 所需的 MySQL 扩展”的错误提示,如果出现这样的情况,应该怎么办?北京六翼信息有限公司的开发工程师指出,要修复错误“您的 PHP 安装似乎缺少 WordPress 所需的 MySQL 扩展”,您需要确保您的 PHP 安装已正确安装和配置 MySQL 数据库驱动程序 (mysqlnd) 和 mysqli 扩展。只有这样,您才能恢复 WordPress 和 WordPress 数据库之间的正常连接,并让您的网站重新运行。
netkiller Nickname:netkiller | English name: Neo chen | QQ: 291379 | 订阅号:netkiller-ebook | 网站:http://www.netkiller.cn