我的 appserv 有问题,我正在尝试登录以创建 SQL 数据库,但是当我输入 Localhost/phpmyadmin 时,它会提示消息框填写用户名和密码。我已经输入了正确的用户名和密码。但是由于用户名/密码错误,我的访问被拒绝?
这是 config.inc.php 摘录
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)?
$cfg['Servers'][$i]['user'] = 'albert'; // MySQL user
$cfg['Servers'][$i]['password'] = '1234'; // MySQL password (only needed
请注意,我已将本地主机更改为 127.0.0.1 即使使用 127.0.0.1/phpmyadmin 也不起作用
$cfg['Servers'][$i]['host'] = '127.0.0.1'; // MySQL hostname or IP address
谁能告诉我我做错了什么吗?
非常感谢 阿尔伯特
最佳答案
由于您将用户名和密码存储在配置文件中,请尝试将 auth_type
更改为 config
:
$cfg['Servers'][$i]['auth_type'] = 'config';
请引用Auth types有关更多详细信息,尤其是 http
部分中的以下几行:
In config.inc.php do not fill in values for
$cfg['Servers'][$i]['user']
and$cfg['Servers'][$i]['password']
关于php - 无法登录 localhost/phpmyadmin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21346189/