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;
    
  • 相关阅读:
    微信小程序使用wxParse解析html
    git基本操作
    thinkphp 静态缓存设置
    phpstudy 安装memcached服务和memcache扩展
    CSS超出部分显示省略号…代码
    小程序支付
    phpstorm 快捷键2
    thinkphp session设置
    cookie与session
    微信小程序 setData动态设置数组中的数据
  • 原文地址:https://www.cnblogs.com/blsnt/p/10179792.html
Copyright © 2011-2022 走看看