代码之家  ›  专栏  ›  技术社区  ›  Yanick Rochon

phpMyAdmin禁用管理员登录

  •  22
  • Yanick Rochon  · 技术社区  · 16 年前

    我遵循了这个思路: http://ubuntuforums.org/showthread.php?t=743991 这让我想到了这条线索 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=499399 但如何解决这一问题,目前还没有明确的指示。

    谢谢!

    5 回复  |  直到 16 年前
        1
  •  50
  •   Svisstack    16 年前

    正常开放 config.inc.php 在我的debian装置上,我可以在 /usr/share/phpmyadmin/config.inc.php auth_type 然后像这样在数组中添加第一个元素 $cfg['Servers'][1] 任何数据(如 $cfg['Servers'][1]['host'] )需要验证。

    编辑:

    在第一行之前添加此行 for config.inc.php文件 :

    $cfg['Servers'][1]['auth_type'] = 'config';
    $cfg['Servers'][1]['host'] = 'localhost'; //edit if you have db in the other host
    $cfg['Servers'][1]['connect_type'] = 'tcp';
    $cfg['Servers'][1]['compress'] = false;
    $cfg['Servers'][1]['extension'] = 'mysql';
    $cfg['Servers'][1]['user'] = 'root'; //edit this line
    $cfg['Servers'][1]['password'] = ''; // edit this line
    
        2
  •  22
  •   matthy    12 年前

    在安装Ubuntu时,配置文件位于 /etc/phpmyadmin/config.inc.php

    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '';
    $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
    $cfg['Servers'][$i]['AllowRoot'] = TRUE;
    
        3
  •  2
  •   jmarceli    12 年前

    /etc/phpmyadmin/config.inc.php

    我补充说:

    $cfg['Servers'][$i]['host'] = 'localhost';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = 'MyPassword';
    

    之后

    /* Authentication type */
    

    注释(关于第107行)

        4
  •  2
  •   Abhinav bhardwaj    9 年前

    打开此文件。 找到 /* Authentication type */ 添加

    /*costume config add by me */
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '';
    $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
    $cfg['Servers'][$i]['AllowRoot'] = TRUE;
    

    这里AllowNoPassword负责允许无密码登录

        5
  •  0
  •   mcanvar    10 年前

    phpmyadmin/config.sample.inc.php 而不是 phpmyadmin/config.inc.php 请重命名示例文件。在我的例子中,它解决了这个问题,并被检测为配置文件。

    推荐文章