How to access remote server with local MAMP

不问归期 提交于 2021-01-28 07:05:47

问题


I want to access my remote server database from my system through PHPMyAdmin. I am using MAMP in my system


回答1:


This is actually quite easy, all you need to do is edit the phpmyadmin config file and restart MAMP servers.

  1. Locate config file.
    Mine is here: /Applications/MAMP/bin/phpMyAdmin/config.inc.php

  2. Edit it to add a new server config (I put it at end of server 1).
    See this answer for the lines that need adding.

  3. Restart servers from MAMP.

  4. You get a drop down of both servers (localhost and remote).




回答2:


Are you using putty? I usually use a tunnel in these situations and then connect as if it were running on the local machine. Not an expert in phpmyadmin, but in the example below you should point it to 127.0.0.1:3307 (keeping 3306 free locally for any local MySQL instances you may be running.)

In the example 3307 is the port on your local machine, 127.0.0.1:3306 is MySQL on the remote machine. (Note the 127.0.0.1 can be changed to 'hop' to another machine that's in the remote network but not directly acessible due to firewall settings etc).

Regards,

James



来源:https://stackoverflow.com/questions/43536898/how-to-access-remote-server-with-local-mamp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!