来自 xampp 服务器的 PhpMyAdmin 中的“无权限”

问题描述 投票:0回答:1

当我尝试以

username:root
password:''
身份登录时,无法登录 PhpMyAdmin。当我输入
admin
作为用户名并将密码字段留空时,我能够登录面板,但当我尝试创建数据库时,
No Privilege
显示为 this

我检查了

config.inc.php
文件中的内容是这样的:

 /* Authentication type and info */
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = '';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Lang'] = '';

请帮我解决这个问题。

phpmyadmin
1个回答
0
投票

似乎您(或 XAMPP 安装程序)已经设置了 MySQL 密码。如果您不知道它是什么,可以重置它。 https://serverfault.com/questions/4309/how-to-reset-or-recover-admin-account-password-for-mysql是任何MySQL服务器的通用指南,但请查看http:// veerasundar.com/blog/2009/01/how-to-change-the-root-password-for-mysql-in-xampp/ 看起来 XAMPP 提供了一种从 http://localhost 设置密码的方法直接 /security/,所以先尝试一下。

没有权限工作的管理员用户只是匿名用户,您不太可能实际上设置了“管理员”帐户。如果用户名(和/或主机)与现有用户不匹配,MySQL 匿名用户将允许您连接(但没有任何实际权限)。一旦您重新获得服务器的控制权,您可以根据需要禁用匿名用户。

我通常建议使用 auth_type cookie,在这种情况下,您不需要在配置文件中硬编码您的用户名和密码;登录时系统会提示您输入该信息。

© www.soinside.com 2019 - 2024. All rights reserved.