zoukankan      html  css  js  c++  java
  • apache安装phpMyAdmin

    安装phpMyAdmin

    我这里是LAMP环境

    1. 安装httpd,和phpMyAdmin,数据库可以yum安装看你自己情况选择安装方式
    $ yum -y install httpd phpMyAdmin php
    
    1. 修改apache的配置
    $  vim /etc/httpd/conf.d/phpMyAdmin.conf
    

    将文件中所有的127.0.0.1用本地的ip替换,如:

    <RequireAny>
           Require ip xx.xx.xx.xx(你所在位置的公网ip)
           Require ip ::1
    </RequireAny>
    

    可以使用sed -i 's#127.0.0.1#这里是替换成什么ip#g' /etc/httpd/conf.d/phpMyAdmin.conf

    1. 修改apache配置后,重启httpd服务,如果只需要访问本地的数据库,到此就完成了。
    2. 如果需要配置访问其他非本地的数据库,修改phpmyadmin配置文件
    $ vim /etc/phpMyAdmin/config.inc.php
    

    在server configuration部分的最后,添加如下内容:

    $i++;
    $cfg['Servers'][$i]['verbose'] = '(db name)';
    $cfg['Servers'][$i]['host'] = '(db host)';
    $cfg['Servers'][$i]['port'] = '';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['AllowNoPassword'] = false;
    
  • 相关阅读:
    123457123456---com.threeObj3.BabyShizi02--- 宝宝识字02
    协议
    123457---com.threeObj.Baobaoshizi01--- 宝宝识字01
    123456---com.twoapp.ErTongNongChangPinTu---儿童农场拼图
    Mysql
    MySQL的四种事务隔离级别
    Git撤销&回滚操作
    java.util.Timer简介
    git常用命令
    BigDecimal转String
  • 原文地址:https://www.cnblogs.com/blsnt/p/10179792.html
Copyright © 2011-2022 走看看