How to setup an SSH tunnel to access phpMyAdmin on Google Compute Engine

The other day I was working on Google Compute Engine, and I setup a new WordPress site on the Google Compute Engine. I run into an issue with phpMyAdmin as it gave me an warning when I tried to access it through the web browser, the message “For security reasons, this URL is only accessible using localhost ( as the hostname”

The Google Compute Engine is using bitmani to deploy apps into the cloud, so when I selected the WordPress installation in Google Compute Engine, I I used the bitmani wiki to find answers about how to use phpMyAdmin.

What I had to do was to setup a SSH tunnel

ssh -N -p 22 <username>@<ip address server> -L 8888/localhost/80

You could also use programs as putty or other similar applications to make this happen.

After you open the SSH tunnel you access the phpyAdmin in your browser like this –

Some other useful article on How to ssh tunnels for secure network access

3 Responses

  • plancton on March 22, 2016, 11:48:29

    thank you very much Torbjorn : the very important information is : you access the phpyAdmin in your browser like this – !!
    it is not clearly said in all other tutorials. You saved me a lot of time !!

    Reply to plancton
    • plancton on March 22, 2016, 12:30:47

      Unfortunately, I’ve not succeded yet… First login with root and blank password was forbidden (allownopassword= false in . I change the and now I have : Access denied for user ‘root’@’localhost’ !!! Arrrgh….
      phpmyadmin was preinstalled along with the magento stack via Cloud launcher :

      Reply to plancton
      • plancton on March 22, 2016, 12:42:28

        very very strange : the password is the bitnami password for the default user called user initially created by bitnami but it must be used with root !!!

        Reply to plancton