This is how I handle it on one site, kind of a hybrid of hybinet's approach:
Code:
Alias /pma/ "/usr/share/phpmyadmin/"
<Directory "/usr/share/phpmyadmin/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
# Only allow access to phpMyAdmin from localhost
Allow from 127.0.0.1
</Directory>
This only allows access to
http://www.example.com/pma/ from the local machine. I forward a local port via ssh (ssh -L 8080:localhost:80) then access phpMyAdmin via
http://localhost:8080/pma/ on my desktop machine. This was simpler than going through the whole rigamarole of setting up SSL. The limitation is that you can't give someone access to phpMyAdmin without also giving them a login on the machine.
Edit: another limitation is that if you are using virtual hosts, this only works for the first (default) one. That is, the one you would reach if you surfed to the machine's IP address (e.g.,
http://12.34.56.78/).