#1166 Entering "localhost" in config using ssh tunnel doesnt work

closed
nobody
None
5
2011-05-19
2011-05-03
No

Hello i am running a local installation of phpmyadmin on Ubuntu 11.04:
More system information:
MySQL

Server: Localhost via UNIX socket
Server version: 5.1.54-1ubuntu4
Protocol version: 10
User: root@localhost
MySQL charset: UTF-8 Unicode (utf8)

Web server

Apache/2.2.17 (Ubuntu)
MySQL client version: 5.1.54
PHP extension: mysqli

I am using the program gSTM to set up a ssh tunnel to another server and forwarding the port 3306 to 3307.
Then I edit the file /etc/phpmyadmin/config.inc.php
and add the following and everything works just as it should:

$cfg['Servers'][$i]['verbose'] = 'Myhostname.com';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';
$cfg['Servers'][$i]['port'] = '3307';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['auth_type'] = 'config';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;

BUT i must write :
$cfg['Servers'][$i]['host'] = '127.0.0.1';
IF I write:
$cfg['Servers'][$i]['host'] = 'localhost';
it does not work at all (that took me like one hour to find out).
may I suggest that phpMyAdmin supports for you to write localhost there as well.

Discussion

  • Michal Čihař

    Michal Čihař - 2011-05-05

    MySQL treats localhost specially and uses socket for it in all cases, so 127.0.0.1 is needed in this case. Please check MySQL documentation for more details.

     
  • Michal Čihař

    Michal Čihař - 2011-05-05
    • labels: 509094 -->
    • milestone: 1861374 -->
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks