CentOS 安装配置 phpMyAdmin

下载

phpMyAdmin http://www.phpmyadmin.net/home_page/downloads.php

下载2.11.11.3版本到/home/目录,进入目录解压

# cd /home/
# tar –zxvf phpMyAdmin-2.11.11.3-all-languages.tar.gz
# mv phpMyAdmin-2.11.11.3-all-languages phpmyadmin
# mv phpmyadmin /var/www/html/

配置

# chown -R root.apache /var/www/html/phpmyadmin/
# cp /var/www/html/phpmyadmin/config.sample.inc.php \ /var/www/html/phpmyadmin/config.inc.php
# chmod 644 /var/www/html/phpmyadmin/config.inc.php
# yum -y install php-mcrypt
# yum -y install php-mbstring

如果之前apache服务有开的话,此刻需要重启apache

# service httpd restart

扩展配置

查找字符串“$cfg[‘blowfish_secret’]”,此变量设置的是cookie加密密钥,随便输几个字符就可以了;

eg: $cfg['blowfish_secret'] = 'SQL SERVICE MYSQL ADMIN';

查找字符串“$cfg[‘Servers’][$i][‘auth_type’]”,其值默认为“config”,一般用于本机调试,存在一定的安全隐患,建议将其值设置为”cookie”

eg:$cfg['Servers'][$i]['auth_type'] = 'cookie';

安全配置

如果不想在phpMyAdmin中显示information_schema数据库的话需要在config.inc.php中添加一下设置:

$cfg['Servers'][$i]['hide_db'] = 'information_schema';