在我的MySQL数据库中,我创建了两个用户,一个普通用户(拥有一个数据库的权限)和一个超级用户。当我想通过这些帐户登录到phpMyAdmin时,我会得到一个“无法登录到MySQL服务器”的错误。(我正在远程访问)
内部<Directory /usr/share/phpMyAdmin/> in my /etc/httpd/conf.d/phpMyAdmin.conf file:
<Directory /usr/share/phpMyAdmin/>
AddDefaultCharset UTF-8
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require all granted
Require ip 127.0.0.1
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Allow from All
Allow from 127.0.0.1
Allow from ::1
</IfModule>
</Directory>我还在config.inc.php文件中为我的超级管理员提供了用户和密码。我遗漏了什么?我应该对谷歌防火墙做些什么吗?我还没有为MySQL配置防火墙规则,现在应该这样做吗?
编辑:我也尝试过从这个答案:无法登录到phpMyAdmin
$cfg['blowfish_secret'] = 'myPassword'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */仍然不起作用
发布于 2022-01-24 22:07:54
答案可以在以下文章的评论中找到:https://www.digitalocean.com/community/questions/cannot-log-in-to-the-mysql-server-without-code-using-phpmyadmin-on-centos7
“有些应用程序在缓存_sha2 _password方法时遇到了问题。上面设置了使用本机凭证的凭据。”这种情况可能发生在MySQL 8上。
登录到数据库后,可以尝试以下操作:
ALTER USER myUsername IDENTIFIED WITH mysql_native_password BY '123TheBestPassword';https://serverfault.com/questions/1090773
复制相似问题