phpMyAdmin是一个Web界面,通过它可以管理你的MySQL数据库。
1,下载phpmyadmin
下载网址:http://www.phpmyadmin.net/home_page/downloads.php
If you do not have a package available or desire to install your own phpMyAdmin, you can download one of following source packages. Please note that 3.x versions require at least PHP 5.2 and MySQL 5 to use them. If you are using older versions, please choose the 2.x branch, which is still supported for security fixes.
注意好色的部分,phpmyadmin 3.x版本要求php5.2以上,mysql5.0以上,对号入座。如果选错了,出现的问题就难解决了。
2,安装phpmyadmin
tar xvfz phpMyAdmin-3.5.2.2-all-languages.tar.gz
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安装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
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。