centos7.2安装phpmyadmin

前端之家收集整理的这篇文章主要介绍了centos7.2安装phpmyadmin前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

首先服务器要有web 环境

yum install PHPmyadmin

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

 

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

添加Require all granted
PHPmyadmin 访问

修改/etc/PHPMyAdmin/config.inc.PHP: 
['PmaAbsoluteUri']='http://localhost/PHPmyadmin'PHPMyAdmin所处的位置。

<span style="color: #800080;">$cfg['Servers'][<span style="color: #800080;">$i]['host'] = 'localhost'<span style="color: #000000;">;
<span style="color: #008000;">//<span style="color: #008000;">设定MysqL所在的主机名或IP地址。如127.0.0.1这步很重要

<span style="color: #800080;">$cfg['Servers'][<span style="color: #800080;">$i]['auth_type'] = 'cookie'<span style="color: #000000;">;
<span style="color: #008000;">//<span style="color: #008000;"> 设定进入PHPMyAdmin管理MysqL的方式,共有三个选项:config、http、cookie。config是按配置文件登录,为默认方式, 无需任何确认;http是使用HTTP登录管理,在Apache模块安装下才能支持;cookie是最通用的管理方式。后两种方式的用户名和密码都是直接到数据库中验证。

<span style="color: #800080;">$cfg['Servers'][<span style="color: #800080;">$i]['user'] = 'root'<span style="color: #000000;"> ;
<span style="color: #008000;">//<span style="color: #008000;">设定管理MysqL的账号。

<span style="color: #800080;">$cfg['Servers'][<span style="color: #800080;">$i]['password'] = ''<span style="color: #000000;"> ;
<span style="color: #008000;">//<span style="color: #008000;">设定管理MysqL的密码。
<span style="color: #000000;">
要是你想用空密码
把配置中的<span style="color: #800080;">$cfg['Servers'][<span style="color: #800080;">$i]['AllowNoPassword'] = <span style="color: #0000ff;">false<span style="color: #000000;">;
改成 <span style="color: #800080;">$cfg['Servers'][<span style="color: #800080;">$i]['AllowNoPassword'] = <span style="color: #0000ff;">true;

PHP文件:访问http://ip地址/PHPMyAdmin/

Slackware Linux命令:
  
/etc/rc.d/rc.<span style="color: #000000;">httpd restart

ubuntu、Debian 系统命令:

  /etc/init.d/<span style="color: #000000;">apache2 restart

Fedora 、Redhat、CentOS系统重启Apache命令:

  /etc/init.d/<span style="color: #000000;">httpd restart
  或
  service httpd restart(CentOS 成功)

 

猜你在找的Linux相关文章