I've looked around and found many articles on how to get this to work but nothing I've tried has been successful.
I have a Windows 8 (64-bit) vm on a local network and am trying to connect to it to edit the Database. Through Microsoft Remote Desktop I am able to connect to phpmyadmin without a problem, but can't connect to it via browser on the computer that is running MRD. I've tried adding a second user, and set the host column to % for both the root and secondary users. I've also created a password for root.
I have tried a lot of the different Allow/Deny directives in the .conf files in Wamp's Alias folder. The examples I've seen are a bit different though, as theirs just show the directives, while I have this in the confs:
<IfDefine APACHE24>
Require local
</IfDefine>
<IfDefine !APACHE24>
Order Allow,Deny
Allow from all
</IfDefine>
Been pounding my head against the wall for a couple of weeks now. While I can access the DB via Remote Desktop, I am not the only user of the VM and it's more efficient if I can access it via my computer, and even better if I can use Workbench.
Forgot to mention: While I need the above for myself, it will also need to be available for any users of the network, even via VPN.
You can set up an SSH tunnel to forward your localhost:13306 to remote:3306 using
ssh -L13306:dbhost:3306 user@remotehost
This will listen on port 13306
on your localhost, forward connections over the ssh tunnel to remotehost
, where they are then forwarded to dbhost
port 3306
. If that database runs on the remote machine itself, use localhost
for dbhost
, which will be simply 127.0.0.1
as seen from the remote machine:
ssh -L13306:localhost:3306
If you're on windows, you can set up SSH tunnels with Putty.
Once you've logged in, you can connect to the remote database by connecting to localhost:13306
on your machine.
After some desperation digging I finally found the problem. I was able to change a couple of settings in phpmyadmin's config.php from localhost to the web server URL. I had done this once before so not sure why it didn't work the first time. Might have been that I hadn't changed host to % in the db.