【问题标题】:Automatic authentication in PHPMyAdminPHPMyAdmin 中的自动身份验证
【发布时间】:2011-01-30 18:31:01
【问题描述】:

我有一个本地 phpMyAdmin(通过 apt-get 安装),每次尝试打开它时我都厌倦了输入登录名和密码。数据库不包含敏感信息,仅包含测试表,并且仅从 127.0.0.1 可见

我希望 phpMyAdmin 在我打开它时已经以root 用户身份登录,密码为1234(例如)。我该怎么做?

附:在浏览器中保存密码不是我想要的。

解决方案:

    $cfg['Servers'][$i]['user']          = 'root';
    $cfg['Servers'][$i]['password']      = '1234'; // use here your password
    $cfg['Servers'][$i]['auth_type']     = 'config';

【问题讨论】:

    标签: php authentication phpmyadmin


    【解决方案1】:

    在 config.inc.php 中,您还可以在第 94 行附近找到这些行,您可以在其中取消注释该行:

    /* Uncomment the following to enable logging in to passwordless accounts,
     * after taking note of the associated security risks. */
    $cfg['Servers'][$i]['AllowNoPassword'] = TRUE;
    

    这比在文件中更改auth_type 并设置用户名和密码更容易。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-10
      • 2020-04-01
      • 2022-12-10
      • 2020-04-06
      • 2017-03-19
      相关资源
      最近更新 更多