简体   繁体   English

无法通过phpMyAdmin连接到MySQL

[英]Cannot connect to MySQL through phpMyAdmin

I don't know what's going on. 我不知道这是怎么回事。 I've been trying to connect to MySQL through phpMyAdmin, but it's not working. 我一直在尝试通过phpMyAdmin连接到MySQL,但无法正常工作。 This is how my config.inc.php file is set: 这是我的config.inc.php文件的设置方式:

<?php

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

Using the user name root, and my password, I can access MySQL through the terminal. 使用root用户名和密码,我可以通过终端访问MySQL。 However, when I try to log in through phpMyAdmin, I get the following error: Cannot connect: invalid settings. 但是,当我尝试通过phpMyAdmin登录时,出现以下错误:无法连接:无效的设置。

Does anybody know how to get around this? 有人知道如何解决这个问题吗?

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

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

我的密码已过期,因此我对其进行了更新,现在一切又恢复了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM