How to access remote mysql server using local phpmyadmin
It is very tedious to connect your remote mysql box especially when you are working with VPN. Initially I used telnet to connect to mysql box than I try to use workbench. Workbench is good and better than using telnet but again it consume more memory and if VPN got disconnected it just hanged. It so irritating.
Than I try to configure my PHPMyAdmin to access remote mysql server and it is really very easy to setup. Just you need to configure/modify a single in PHPMyAdmin folder i.e. â€œconfig.inc.phpâ€?.
Just add below lines to your â€œconfig.inc.phpâ€? file add the bottom:
$cfg['Servers'][$i]['host'] = 'HostName:port'; //provide hostname and port if other than default
$cfg['Servers'][$i]['user'] = 'userName'; //user name for your remote server
$cfg['Servers'][$i]['password'] = 'Password'; //password
$cfg['Servers'][$i]['auth_type'] = 'config'; // keep it as config
If your mysql server is in remote than make sure that you are very much connected to box and than try to access PHPMyAdmin using url. You will get â€œCurrent Server:â€? drop down with both â€œ127.0.0.1â€? and one what you have provided with â€œ$cfg['Servers'][$i]['host']â€? cam switch between the servers.
Click to See the demo screen:
[caption id="attachment_615" align="aligncenter" width="400"] phpmyadmin[/caption]
My PHPMyAdmin version:Â 188.8.131.52
My MySql Version: 5.5