Cannot log in to the MySQL server (PhpMyAdmin)(无法登录 MySQL 服务器 (PhpMyAdmin))
问题描述
我通过 Homebrew 安装了 MySQL 和 PhpMyAdmin. 当我尝试使用 root 及其密码登录时出现以下错误:
I installed both MySQL and PhpMyAdmin via Homebrew. I get the following error when I try to login with root and its password:
Cannot log in to the MySQL server
我可以通过终端登录到 MySQL:
I can log in to MySQL via the terminal with:
mysql -u root -p
PhpMyAdmin 配置:
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'pass';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
我在 apache 上运行它.我在 stackoverflow 上尝试了所有解决方案,但它们似乎不起作用.有人可以帮我吗?
I'm running this on apache. I tried all the solutions on stackoverflow but they don't seem to work. Can anyone help me?
推荐答案
您可以同时使用 localhost 或 127.0.0.1 作为主机声明.
You can use both localhost or 127.0.0.1 as host declaration.
在您的情况下,您可以尝试使用 localhost 并且它会起作用.
In your case you can try to use localhost and it will work.
这篇关于无法登录 MySQL 服务器 (PhpMyAdmin)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:无法登录 MySQL 服务器 (PhpMyAdmin)
基础教程推荐
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 在多列上分布任意行 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- oracle区分大小写的原因? 2021-01-01
