【发布时间】:2014-01-30 03:06:11
【问题描述】:
我是刚设置 wamp 的新手。我已经在 PHPMyadmin 中为用户 root 设置了密码,现在我认为我也应该在 config.inc.php 中设置密码?
虽然谷歌上的所有指南等都显示这应该在文件中:
/* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'enter_username_here';
$cfg['Servers'][$i]['password'] = 'enter_password_here';
$cfg['Servers'][$i]['AllowNoPasswordRoot'] = true;
我的文件包含:
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/*
* phpMyAdmin configuration storage settings.
*/
所以我想知道如何在 config.inc.php 中设置密码,给定这个?我自己添加行吗?为什么我的配置文件与其他配置文件不同?
【问题讨论】:
-
是的,如果您的配置中缺少该行,只需添加它。您可以在配置文件中添加很多内容:docs.phpmyadmin.net/en/latest/config.html
-
你可以尝试比在这里发帖更快
-
$cfg['Servers'][$i]['AllowNoPassword'] = false;
-
火箭危险品 - 谢谢!很棒的链接。杰西卡——你是什么意思?我可以登录 PHPMyadmin 并连接到数据库和之前的所有内容。如果我添加这些行,我不知道它们会产生什么不同。我想知道我是否错过了一些重要的步骤。我以前从未安装过。
-
不同的是不再需要用mysql用户名和密码“登录”。它将自动从配置中检索。在生产现场不安全,但在开发中,它是好的
标签: phpmyadmin wamp