通过phpMyAdmin连接到隧道数据库

时间:2013-04-14 20:14:52

标签: mysql database phpmyadmin tunnel

所以我已经将数据库隧道传输到127.0.0.1上的端口3307.我可以使用Ubuntu的MySQL Workbench连接到数据库并做任何我想要的事情,但是我真的不喜欢GUI的界面所以我想使用ol'friend phpMyAdmin。

我使用的连接参数是:

$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['port'] = 3307;
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['connect_type']= 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['user'] = 'myDBuser';
$cfg['Servers'][$i]['password'] = 'myDBpass';

当我转到http://localhost/phpmyadmin时,从下拉列表中选择我的服务器并单击“开始”,将显示以下错误:

#1045 - Access denied for user 'myDBuser'@'localhost' (using password: YES) 

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

我的登录详细信息是正确的。

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:0)

我设法通过删除密码并使用无密码登录来实现它。我不知道为什么它可以在没有证明密码的情况下登录,但它现在正在工作。谢谢大家的帮助!