Phpmyadmin Wamp-config.inc.php中缺少行

Phpmyadmin Wamp-config.inc.php中缺少行,phpmyadmin,wamp,Phpmyadmin,Wamp,我是个新手,刚开始做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]['p

我是个新手,刚开始做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中设置密码,考虑到这一点?我只是自己添加行吗?为什么我的配置文件与其他配置文件不同?

您的文件当前包含此权限

/* 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;
添加行

$cfg['Servers'][$i]['user'] = 'enter_username_here';
$cfg['Servers'][$i]['password'] = 'enter_password_here';
改变

$cfg['Servers'][$i]['auth_type'] = 'cookie';

所以你的文件看起来像这样

/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'enter_username_here';
$cfg['Servers'][$i]['password'] = 'enter_password_here';
/* 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;

是的,如果配置中缺少该行,只需添加它。你可以在配置文件中放很多东西:你可以比在这里发帖更快地尝试使用$cfg['Servers'][$i]['AllowNoPassword']=false;火箭危险品-谢谢!很好的链接。杰西卡-你什么意思?我可以登录到PHPMyadmin并连接到数据库和以前的一切。如果我加上这些行,我不知道它们会有什么不同。我想知道我是否错过了重要的一步。我以前从未安装过它。区别在于你不再需要用mysql用户名和密码“登录”。它将自动从配置中检索。它在生产现场不安全,但在开发中,它是好的
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'enter_username_here';
$cfg['Servers'][$i]['password'] = 'enter_password_here';
/* 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;