centos安装phpmyadmin

来源:互联网 发布:纳什 数据库 编辑:程序博客网 时间:2024/06/05 13:21

首先服务器要有web 环境

yum install phpmyadmin

有时候会安装不成功,提示没有可用软件包,则需要安装Remi源 

# yum install epel-release# rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm

 

 修改/etc/http.conf/conf.d/phpMyadmin.conf

将  #Require ip 127.0.0.1   #Require ip ::1   注释
添加Require all granted
 
即可在浏览器通过ip/phpmyadmin 访问
我的服务器为centos7.2 
 
文档截图
 
 
修改/etc/phpMyAdmin/config.inc.php: 
复制代码
$cfg['PmaAbsoluteUri']='http://localhost/phpmyadmin';//将该参数的值设定为phpMyAdmin所处的位置。$cfg['Servers'][$i]['host'] = 'localhost';//设定MySQL所在的主机名或IP地址。如127.0.0.1这步很重要$cfg['Servers'][$i]['auth_type'] = 'cookie';// 设定进入phpMyAdmin管理MySQL的方式,共有三个选项:config、http、cookie。config是按配置文件登录,为默认方式, 无需任何确认;http是使用HTTP登录管理,在Apache模块安装下才能支持;cookie是最通用的管理方式。后两种方式的用户名和密码都是直接到数据库中验证。$cfg['Servers'][$i]['user'] = 'root' ;//设定管理MySQL的账号。$cfg['Servers'][$i]['password'] = '' ;//设定管理MySQL的密码。 要是你想用空密码把配置中的$cfg['Servers'][$i]['AllowNoPassword'] = false;改成 $cfg['Servers'][$i]['AllowNoPassword'] = true;
复制代码

设 置完成后,保存config.inc.php文件,重启Apache测试:访问http://ip地址/phpMyAdmin/

复制代码
各linux版本重启apache命令Slackware Linux命令:  /etc/rc.d/rc.httpd restartubuntu、Debian 系统命令:  /etc/init.d/apache2 restartFedora 、Redhat、CentOS系统重启Apache命令:  /etc/init.d/httpd restart  或  service httpd restart(CentOS 成功)
复制代码

 

分类: Linux,VirtualBox
好文要顶关注我 收藏该文
陈达辉
关注 - 0
粉丝 - 32
+加关注
0
0
«上一篇:VirtualBox设置NAT端口映射
»下一篇:Remi 安装源
原创粉丝点击