Discuz! Board
标题:
phpadmin配置说明
[打印本页]
作者:
zhang.qiangjun
时间:
2015-10-15 17:48
标题:
phpadmin配置说明
安装
1.nginx,php
yum install nginx -y
yum install php -y
2.从svn中找到phpmyadmin的bz的包
附件里也有
3.上传phpmyadmin的包到相应的位置.线上的所有数据都放在/data/(数据盘上)
进入到phpmyadmin的主目录
#cd /data/phpMyAdmin
配置:
配置config.inc.php文件(可能不存在)
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie'; #验证方式.cookie config直接登陆,免验证
$cfg['Servers'][$i]['user'] = 'webuser'; #web登陆用户
$cfg['Servers'][$i]['password'] = 'webpassword'; #web登陆密码
$cfg['Servers'][$i]['host'] = 'mysqlip'; #接入mysql的IP
$cfg['Servers'][$i]['port'] = '3306'; #mysql端口
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['user'] = 'mysqluser'; #mysql用户名
$cfg['Servers'][$i]['password'] = 'mysqlpassword'; #mysql密码
多个数据库,可以配置多个.
配置nginx
server {
listen 80;
server_name _;
root /data/phpMyAdmin;
index index.php;
access_log logs/phpmyadmin_access.log;
error_log logs/phpmyadmin_error.log;
if ($request_filename ~* "\.(js|ico|gif|jp?g|bmp|png|css)$")
{
break;
}
location ~ \.json$ {
error_page 405 =200 $request_uri;
}
if (!-e $request_filename){
rewrite ^/(.*) /index.php last;
}
location ~ \.php$ {
index index.html index.htm index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#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 html;
}
}
#关注防火墙的状态
#直接访问http://ip/
就可以直接访问phpmyadmin
目前搭好的phpmyadmin
1.
http://123.59.77.201/index.php
#生产环境tvservice的从库
2.
http://180.150.187.229/index.php
#付费系统(测试环境) 10.10.26.94
增加新的访问关系
1.访问10.10.26.94 对mysql服务器的访问,用户名/密码
2.修改phpmyadmin的配置文件
vim /data/phpMyAdmin/config.inc.php
增加配置
/*
* 服务器X
*/
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'mysqluser';
$cfg['Servers'][$i]['password'] = 'mysqlpasswd';
$cfg['Servers'][$i]['host'] = 'mysqlip';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['user'] = 'mysqluser';
$cfg['Servers'][$i]['password'] = 'mysqlpasswd';
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
访问http://ip/,使用mysqluser,mysqlpasswd,选择mysqlip登陆
作者:
wushiwei
时间:
2016-1-27 12:02
配置phpadmin 访问 mysql数据 服务器: 10.10.26.94 180.150.187.229
欢迎光临 Discuz! Board (http://123.59.83.120:8080/)
Powered by Discuz! X3.2