您好,登录后才能下订单哦!
环境说明:
系统版本:centos 6.6 32bit
软件版本:mysql 5.6.25 、nginx1.6.2 、 php5.4.37 LNMP架构
说明:mysql5.5版本以上需要使用phpmyadmin4.4版本以上;
步骤如下:
# unzip phpMyAdmin-4.4.7-all-languages.zip
# mv phpMyAdmin-4.4.7-all-languages/* /usr/local/nginx/html/phpmyadmin/
# cd /usr/local/nginx/html/phpmyadmin/
# cp config.sample.inc.php config.inc.php
浏览器访问 192.168.20.5/phpmyadmin
使用root用户,密码为mysql密码登录;
报错如下图:无法登录MySQL服务器;
出现这个错误,表示没有连接到数据库
解决方法:
# vi config.inc.php
找到这一行 $cfg['Servers'][$i]['host'] = 'localhost';
修改为:$cfg['Servers'][$i]['host'] = '127.0.0.1';
重新连接就登录进去了;
nginx虚拟主机配置如下:
# cat /usr/local/nginx/conf/vhosts/default.conf server { listen 80; server_name 192.168.20.5; index index.html index.htm index.php; root /usr/local/nginx/html; location ~ \.php$ { include fastcgi_params; fastcgi_pass unix:/tmp/php-fcgi.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }
php-fpm配置如下:
# cat /usr/local/php/etc/php-fpm.conf [global] pid = /usr/local/php/var/run/php-fpm.pid error_log = /usr/local/php/var/log/php-fpm.log [www] user = php-fpm group = php-fpm listen = /tmp/php-fcgi.sock listen.mode = 0666 pm = dynamic pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 500 rlimit_files = 1024
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。