一、离线安装
1,下载phpmyadmin
下载网址:http://www.phpmyadmin.net/home_page/downloads.phpphpmyadmin 3.x版本要求php5.2以上,5.0以上,对号入座。如果选错了,出现的问题就难解决了。2,安装phpmyadmin解压 tar xvfz phpMyAdmin-3.5.2.2-all-languages.tar.gz,并将文件夹复制到网站主目录/var/www/html/
3,配置phpmyadminI. 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. 安装phpMyAdminyum -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/phpmyadminOrder deny,allowDeny from allAllow from 127.0.0.1Allow from 192.168.0这里只允许本机和192.168.0.0网段的主机访问,如果允许外网用户,则配置为:Alias /phpmyadmin /var/www/phpmyadmin
Order deny,allowAllow from all [root@linuxso.com ~]# /etc/rc.d/init.d/httpd restart 重新启动HTTP服务,使以上设置生效Stopping httpd: [ OK ]Starting httpd: [ OK ]