wp-local-docker-v2 icon indicating copy to clipboard operation
wp-local-docker-v2 copied to clipboard

phpMyAdmin Shortcut

Open ChaosExAnima opened this issue 6 years ago • 4 comments

I believe it would be useful to allow a way to jump to the relevant phpMyAdmin page using the /__dbadmin / URL like is done for memcache and ES.

The approach that could work:

  1. Write a proxypass rule in nginx for the appropriate host.
  2. Add header using proxy_set_header to set auto-login.
  3. Write a PHP file to check for header and automatically logs in using wordpress credentials.
  4. Set up custom configuration for the main DB container to use the PHP file.
  5. Profit?

Bonus: If the system can detect the correct DB name, you can automagically only display the site's DB with the config. You'll need to find a way to pass that to nginx, however.

ChaosExAnima avatar Jan 24 '19 23:01 ChaosExAnima