phpMyAdmin拒绝访问数据库

时间:2019-07-09 07:48:18

标签: php mysql xampp

我正在使用Xampp设置mySQL数据库。昨天数据库很好,但今天它停止让我进入。错误是:

MySQL said: Documentation
Cannot connect: invalid settings.
mysqli_real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server
Connection for controluser as defined in your configuration failed.
mysqli_real_connect(): (HY000/1130): Host 'localhost' is not allowed to connect to this MariaDB server
phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

我尝试了this stackoverflow中的方法。我将其更改为cookie,更改了root和密码,用户控制器。这些都不起作用。像在配置中一样将用户名和密码分别输入 root 1234 仍然使我收到拒绝权限的信息。

这是我的配置脚本(身份验证部分)

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

/* Bind to the localhost ipv4 address and tcp */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';

/* User for advanced features */
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '1234';

这是我失败的尝试 My failed attempt

此外,我需要输入http://localhost:1234/才能访问任何内容,而不仅仅是http://localhost/。是因为我无法取消注释<中的 host.txt 文件strong> etc 目录?我正在学校的笔记本电脑上工作,所以没有管理员权限和东西。

0 个答案:

没有答案
相关问题