phpmyadmin 无效的设置,mysqli_真实的_connect():(HY000/1130):不允许主机'localhost'连接到此MariaDB服务器

jtw3ybtb  于 2023-10-20  发布在  PHP
关注(0)|答案(1)|浏览(167)

我得到了以下错误,而访问http://localhost/phpmyadmin的xampp服务器上

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.

所以我在my.ini中添加了'skip-grant-tables',现在可以访问了。然而,在xampp服务器中安装Magento 2时,我收到以下错误:

Database user does not have enough privileges. Please make sure SELECT, INSERT, UPDATE, DELETE,       CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, TRIGGER privileges are granted to database 'magento2'.

我将无法安装Magento,除非'skip-grant=tables'被删除?但是这样做之后,我甚至无法访问phpmyadmin。应该做些什么来解决这个问题?
PS:我已经安装了WInNMP,但在我意识到这个问题后,我关闭了它,但它似乎没有解决这个问题

5uzkadbs

5uzkadbs1#

在MySQL的用户表中似乎有问题
修复它,然后再次创建根用户,以前似乎已经被删除,我也删除了'skip-grant-tables'从my.ini从Xampp控制面板的配置.已从Xampp控制面板停止并启动Xampp和Mysql服务器

相关问题