我有一个新的 EC2/RDS 设置。我遵循了大约 5 个不同的指南,但无法连接 phpMyAdmin。
首先,这不是安全组问题。我已临时设置 RDS 服务器接受所有连接。我可以从命令行使用 mysql 从 EC2 机器连接到它。
我从 EPEL repo 安装了 phpMyAdmin。
我已经四次检查了我的 config.inc.php 文件。我相信它设置正确。
$i++;
$cfg['Servers'][$i]['host'] = 'xxx.us-west-1.rds.amazonaws.com'; // MySQL hostname or IP address
$cfg['Servers'][$i]['port'] = '3306'; // MySQL port - leave blank for default port
$cfg['Servers'][$i]['socket'] = ''; // Path to the socket - leave blank for default socket
$cfg['Servers'][$i]['connect_type'] = 'tcp'; // How to connect to MySQL server ('tcp' or 'socket')
$cfg['Servers'][$i]['extension'] = 'mysqli'; // The php MySQL extension to use ('mysql' or 'mysqli')
$cfg['Servers'][$i]['compress'] = FALSE; // Use compressed protocol for the MySQL connection
// (requires PHP >= 4.3.0)
$cfg['Servers'][$i]['controluser'] = ''; // MySQL control user settings
// (this user must have read-only
$cfg['Servers'][$i]['controlpass'] = ''; // access to the "mysql/user"
// and "mysql/db" tables).
// The controluser is also
// used for all relational
// features (pmadb)
$cfg['Servers'][$i]['auth_type'] = 'cookie';
尽管如此,每次我尝试使用 phpMyAdmin 进行连接时,我都会收到错误 #2003 无法登录到 MySQL 服务器
我真的没主意了。我卸载了 phpmyadmin 并尝试将所有文件手动放在 html 目录中,我得到了相同的结果。我尝试更改配置文件中的大部分设置(压缩、连接类型、auth_type),但没有成功。我不敢相信我一直在尝试让 phpMyAdmin 工作 2.5 小时,但没有成功。不知道发生了什么,所有的网络搜索都干涸了......似乎我是唯一遇到这个问题的人。
如果有人有任何想法可以帮助我解决这个问题,我会很感激。