分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 代码编程

phpMyAdmin的配置

发布时间:2023-09-06 02:03责任编辑:白小东关键词:配置

环境说明:

[root@yunwei-test libraries]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)


[root@yunwei-test libraries]# /application/nginx-1.10.2/sbin/nginx -V
nginx version: nginx/1.10.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)
built with OpenSSL 1.0.2k-fips ?26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/application/nginx-1.10.2 --user=www --group=www --with-http_ssl_module --with-http_stub_status_module


[root@yunwei-test libraries]# mysql -V
mysql ?Ver 14.14 Distrib 5.6.36, for Linux (x86_64) using ?EditLine wrapper


[root@yunwei-test libraries]# /application/php-5.5.32/bin/php -v
PHP 5.5.32 (cli) (built: Jul 12 2018 14:10:03)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies

下载PHPMyadmin软件包解压到nginx站点目录下

[root@yunwei-test ~]# wget https://files.phpmyadmin.net/phpMyAdmin/4.8.2/phpMyAdmin-4.8.2-all-languages.zip
[root@yunwei-test ~]# unzip phpMyAdmin-4.8.2-all-languages.zip
[root@yunwei-test ~]# mv phpMyAdmin-4.8.2-all-languages/* /application/nginx-1.10.2/html/

nginx配置文件

worker_processes ?1;events { ???worker_connections ?1024;}http { ???include ??????mime.types; ???default_type ?application/octet-stream; ???sendfile ???????on; ???keepalive_timeout ?65; ???log_format ?main ?‘$remote_addr - $remote_user [$time_local] "$request" ‘ ?????????????????????‘$status $body_bytes_sent "$http_referer" ‘ ?????????????????????‘"$http_user_agent" "$http_x_forwarded_for"‘; ???server { ???????listen ??????80; ???????server_name 10.0.3.59; ???????root ??html; ???????index ?index.php index.html index.htm; ???????access_log ?logs/access.log main; ???????location ~ .*\.(php|php5)?$ { ???????????fastcgi_pass ??127.0.0.1:9000; ???????????fastcgi_index ?index.php; ???????????include ???????fastcgi.conf; ???????} ???}}

修改/libraries/config.default.php配置文件。

39 $cfg[‘PmaAbsoluteUri‘] = ‘phpMyAdmin主机IP‘;131 $cfg[‘Servers‘][$i][‘host‘] = ‘数据库IP‘;138 $cfg[‘Servers‘][$i][‘port‘] = ‘数据库端口,默认3306‘;248 $cfg[‘Servers‘][$i][‘auth_type‘] = ‘cookie‘;262 $cfg[‘Servers‘][$i][‘user‘] = ‘连接数据库的用户‘;269 $cfg[‘Servers‘][$i][‘password‘] = ‘对应的数据库用户密码‘;

# $cfg[‘Servers‘][$i][‘auth_type‘] = [‘http‘|‘cookie‘|‘config‘]

  * ‘config‘ 认证($auth_type = ‘config‘)是最简单的模式,用户名和密码存储在 config.inc.php 文件里;

  * ‘cookie‘ 认证($auth_type = ‘cookie‘),以MySQL 用户登录。

$cfg[‘Servers‘][$i][‘user‘] 

 如果 auth_type = ‘config‘,phpMyAdmin 将使用这个账户来连接 MySQL 服务器。

浏览器访问phpMyAdmin,输入数据库用户和密码,连接数据库。

官网地址:https://www.phpmyadmin.net/

phpMyAdmin的配置

原文地址:https://www.cnblogs.com/root0/p/9300772.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved