So - in spite having two separate networks and all services having different names there seems to be a collision. Prerequisites Step 1: Download the latest phpMyAdmin Step 2 Setup Nginx for phpMyAdmin Step 3 Restart Nginx Step 4 Access phpMyAdmin Step 5 - Secure. Unfortunately, the exact same problem occurred. (The opposite problem occurs when starting b before a).īy the way - I also tried a setup with to separate networks "a" and "b" instead of connecting to the "default" network (I thought that maybe my problem was that both site's databases were hosted on the same network). However, for the Nginx web server to find and serve the phpMyAdmin files correctly, you’ll need to create a symbolic link from the installation files to Nginx’s document root directory. However, after starting docker/b/docker-compose.yml, I get the nasty #2002 error when trying to login at db.b. If i start docker/a/docker-compose.yml, before docker/b/docker-compose.yml I can with no issue login to a's database from phpmyadmin at db.a. To clarify, the same example as i posted before is still valid: So to summarize, now both the site works "alone" but when both are running, I can only access the database which is connected to the site i start first.
So again, I am wondering what I'm missing. Make sure you have Nginx and PHP 7 installed on your system before installing phpMyAdmin.
(The opposite problem occurs when starting b before a).Īt first I thought i could solve it by starting two separate networks - a and b (instead of using "default" one on both sites). Once the EPEL repository is enabled, install phpMyAdmin and all of it’s dependencies with the following command: sudo yum install phpmyadmin. However, after starting docker/ b/docker-compose.yml, I get the nasty #2002 error when trying to login at db.b. However, only the site that is started first can be properly accessed from phpMyAdmin.Įxample: If i start docker/ a/docker-compose.yml, before docker/ b/docker-compose.yml I can with no issue login to a's database from phpmyadmin at db.a.
Now we'll create a new one using: sudo ln -s /usr/share/phpmyadmin/ /var/www/html/phpmyadmin Since you've set root to /var/www/html, that's your 'home' directory or root path that your server block uses. The proxy and both of the two systems are startable, and i can reach the sites a. and b. rm -rf /usr/share/nginx/www That won't delete phpMyAdmin, it'll just delete the symlink.