

In wamp server, you can find it in wamp\apps\phpmyadmin folder. You have to edit this configuration file.įirst open file held in phpMyAdmin folder. In order to connect to another server, you would have to add another set of config options to the config array. It uses an array to store sets of config options for every server it can connect to and by default there is only one, your own machine, or localhost. The file contains the configuration settings for your phpMyAdmin installation.
#PHPMYADMIN CONFIG HTTP AUTH PASSWORD#
Alternatively, you can leave the username and password variables empty to be prompted to enter them each time you log in, which is a lot more secure.įollow this blog post. In addition, remember that your remote database's username and password is stored in plain text when you connect like this, so you should take steps to ensure that no one can access this config file. Without proper server configuration, the connection may be slower than a local connection for example, it's would probably be slightly faster to use IP addresses instead of host names to avoid the server having to look up the IP address from the hostname.

Find the $cfg and $cfg variables and set these to your username and password for the remote server.Find the $cfg variable, and set it to the remote mysql port.Find the $cfg variable, and set it to the IP or hostname of your remote server.Find phpMyAdmin's configuration file, called.If for any reason the link dies, you can use the following steps: It can be done, but you need to change the phpMyAdmin configuration, read this post: I wrote a more in-depth blog post about exactly this, in case you need additional help. Add the following to the end of the file: $cfg = 'Remote Server 1' // Change this to whatever you like. If you want to run this in the background, you'll need to add the -f argument, and set up Passwordless SSH between your local machine and the remote machine.Īfter you've got the SSH tunnel working, you can add the remote server to the servers list in your local phpMyAdmin by modifying the /etc/phpmyadmin/ file. The following command will set up an SSH tunnel which will forward all requests made to port 3307 from your local machine to port 3306 on the remote machine: ssh -NL 3307:localhost:3306 prompted, you should enter the password for the root user on the remote machine. I prefer a slightly different solution involving SSH Tunnelling. And for that to work, you have to configure the remote server's MySQL server to accept remote connections, and allow traffic through the firewall for the port number that MySQL is listening to. It is certainly possible to access a remote MySQL server from a local instance of phpMyAdmin, as the other answers have pointed out.
