CentOS 6.3_64位搭建phpMyAdmin
phpMyAdmin,是一个Web界面,通过它可以管理你的MySQL数据库。
准备工作: 先安装apache(httpd)、mysql、php,安装教程请见我的博客 CentOS 安装 PHP
1,phpmyadmin下载
官方下载地址: downloads,最新版本 phpMyAdmin-4.1.9-all-languages.tar.gz
Released Thu, 06 Mar 2014 20:36:39 GMT, see release notes for details.
Current version compatible with PHP 5.3 and MySQL 5.5. Currently recommended version.
2,安装phpmyadmin
1) 拷贝 phpMyAdmin-4.1.9-all-languages.tar.gz 到 apache网页根目录下 /var/www/html/
cp phpMyAdmin-4.1.9-all-languages.tar.gz /var/www/html/
2) 解压
tar zxvf phpMyAdmin-4.1.9-all-languages.tar.gz
3) 重命名
mv phpMyAdmin-4.1.9-all-languages/ phpmyadmin
4) 进入 phpmyadmin,修改配置文件
cd phpmyadmin/
cp config.sample.inc.php config.inc.php
5) 重启apache(httpd)
service httpd restart
6) 访问网页
http://15.129.27.28/phpmyadmin (提示输入用户名和密码,即MySQL数据库的)
3,配置phpmyadmin(可选)
1) config.sample.inc.php更名为config.inc.php;
2) 打开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’;
去掉每行前面的//;
3) $cfg['blowfish_secret'] = ”; |修改为| $cfg['blowfish_secret'] = ‘http’;
4) $cfg['Servers'][$i]['controluser'] = ‘pma’; |把’pma’修改为你的帐号|$cfg['Servers'][$i]['controlpass'] = ‘pmapass’; |把’pmapass设置为你的mysql登录密码|
5) $cfg['blowfish_secret'] = ”; | 添加短语密码例如:$cfg['blowfish_secret'] = ‘onohot’;
您可以根据访问phpMyAdmin
http://ip/phpmyadmin/
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/网段的主机访问,如果允许外网用户,请不要填写标签中的内容
[root@linuxso.com ~]# /etc/rc.d/init.d/httpd restart 重新启动HTTP服务,使以上设置生效
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
接着就来测试下是否成功: https://192.168.1.2/phpmyadmin
版权所有: 本文系米扑博客原创、转载、摘录,或修订后发表,最后更新于 2014-03-21 09:45:43
侵权处理: 本个人博客,不盈利,若侵犯了您的作品权,请联系博主删除,莫恶意,索钱财,感谢!