问题
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.
Locate config file.
Mine is here:/Applications/MAMP/bin/phpMyAdmin/config.inc.php
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.Restart servers from MAMP.
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