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)
基础教程推荐
- 带有WHERE子句的LAG()函数 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
