标签:
一、离线安装
1,下载phpmyadmin
下载网址:http://www.phpmyadmin.net/home_page/downloads.php
phpmyadmin 3.x版本要求php5.2以上,mysql5.0以上,对号入座。如果选错了,出现的问题就难解决了。
2,安装phpmyadmin
解压 tar xvfz phpMyAdmin-3.5.2.2-all-languages.tar.gz,
并将文件夹复制到网站主目录/var/www/html/
3,配置phpmyadmin
I. config.sample.inc.php更名为config.inc.php;
II. 打开config.inc.php文件,进行以下修改;
// $cfg[‘Servers‘][$i][‘controluser‘] = ‘pma’;
// $cfg[‘Servers‘][$i][‘controlpass‘] = ‘pmapass’;
// $cfg[‘Servers‘][$i][‘pmadb‘] = ‘phpmyadmin’;
// $cfg[‘Servers‘][$i][‘bookmarktable‘] = ‘pma_bookmark’;
// $cfg[‘Servers‘][$i][‘relation‘] = ‘pma_relation’;
// $cfg[‘Servers‘][$i][‘table_info‘] = ‘pma_table_info’;
// $cfg[‘Servers‘][$i][‘table_coords‘] = ‘pma_table_coords’;
// $cfg[‘Servers‘][$i][‘pdf_pages‘] = ‘pma_pdf_pages’;
// $cfg[‘Servers‘][$i][‘column_info‘] = ‘pma_column_info’;
// $cfg[‘Servers‘][$i][‘history‘] = ‘pma_history’;
// $cfg[‘Servers‘][$i][‘designer_coords‘] = ‘pma_designer_coords’;
去掉每行前面的//;
III.$cfg[‘blowfish_secret‘] = ”; |修改为| $cfg[‘blowfish_secret‘] = ‘http’;
IV.$cfg[‘Servers‘][$i][‘controluser‘] = ‘pma’; |把’pma’修改为你的帐号|$cfg[‘Servers‘][$i][‘controlpass‘] = ‘pmapass’; |把’pmapass设置为你的mysql登录密码|
V. $cfg[‘blowfish_secret‘] = ”; | 添加短语密码例如:$cfg[‘blowfish_secret‘] = ‘onohot’;
您可以根据访问phpMyAdmin http://ip/phpmyadmin/管理数据库:
二、通过yum安装
通过yum安装phpMyAdmin及配置过程
1. 安装mysql + php环境。
2. 安装phpMyAdmin
yum -y install phpMyAdmin
安装完成后如下配置:
因为使用yum安装,配置略有不同
phpmyadmin默认安装在、usr/share/phpmyadmin 把phpmyadmin拷贝到web目录下:
[root@linuxso.com ~]# chown -R root:apache /var/www/phpmyadmin/
[root@linuxso.com ~]# vi /etc/httpd/conf.d/phpmyadmin.conf 建立供Apache调用的phpMyAdmin配置文件
Alias /phpmyadmin /var/www/phpmyadmin
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from 192.168.0
这里只允许本机和192.168.0.0网段的主机访问,如果允许外网用户,则配置为:
Alias /phpmyadmin /var/www/phpmyadmin
Order deny,allow
Allow from all
[root@linuxso.com ~]# /etc/rc.d/init.d/httpd restart 重新启动HTTP服务,使以上设置生效
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
标签:
原文地址:http://www.cnblogs.com/tiger2soft/p/4850439.html