gpt4 book ai didi

php - 无法通过 phpMyAdmin 连接到 MySQL

转载 作者:行者123 更新时间:2023-11-29 21:42:44 25 4
gpt4 key购买 nike

我不知道发生了什么。我一直在尝试通过 phpMyAdmin 连接到 MySQL,但它不起作用。这就是我的 config.inc.php 文件的设置方式:

<?php

$i=0;
$i++;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'myPassword';
$cfg['Servers'][$i]['auth_type'] = 'config';
?>

使用用户名 root 和我的密码,我可以通过终端访问 MySQL。但是,当我尝试通过 phpMyAdmin 登录时,出现以下错误:无法连接:设置无效。

有人知道如何解决这个问题吗?

最佳答案

尝试重新排序配置,以便以下行位于用户和密码之前:

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

关于php - 无法通过 phpMyAdmin 连接到 MySQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34364431/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com