【问题标题】:Connect to tunneled DB through phpMyAdmin通过 phpMyAdmin 连接到隧道数据库
【发布时间】:2013-04-14 20:14:51
【问题描述】:

所以我已经通过隧道将数据库连接到 127.0.0.1 上的端口 3307 .. 我可以使用 Ubuntu 的 MySQL Workbench 连接到数据库并做任何我想做的事情,但是我真的不喜欢 GUI 的界面,所以我想使用老朋友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时,从下拉列表中选择我的服务器并单击Go,显示以下错误:

#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.

我的登录信息是正确的。

非常感谢任何帮助!

【问题讨论】:

  • 检查,再次检查,然后三次检查用户名和密码。可以肯定的是,暂时恢复到默认端口(3306),看看它是否有效。
  • 您是否尝试在终端中手动执行此操作? mysql -u myDBuser -p --host 127.0.0.1 --port 3307
  • 1337holiday,我试过了,它没有用,它返回了与 phpMyAdmin 相同的错误,但是,使用 MySQL 工作台可以完美地工作。有什么问题?

标签: mysql database phpmyadmin tunnel


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2014-07-20
    • 2013-04-05
    • 1970-01-01
    • 2014-09-17
    • 2021-12-02
    • 1970-01-01
    • 2016-04-30
    • 2015-09-18
    • 2011-02-17
    相关资源
    最近更新 更多