darkcyde Posted November 1, 2018 Share Posted November 1, 2018 Hi all - I'm hoping someone can help me with this as I've been chewing on it for about a week now! I'm trying to get a database server running with PHPMyAdmin as the interface for admin.....I've got MariaDB up and running, and that's working with my Kodi Database. I've got the PHPMYAdmin Docker running from https://hub.docker.com/r/phpmyadmin/phpmyadmin/, and I can get to the login screen for PHPMyAdmin. I think I understand from the Guide that I need to create a link container, which I asssume links the MariaDB Docker to the PHPMyAdmin Docker, but this is where I'm stuck. I'm running the command as shown in the Guide, modifying it to... docker run --name myadmin -d --link mariadb:db -p 8181:81 phpmyadmin/phpmyadmin ...Where MariaDB is the name of the Maria docker, and I've changed the port numbers to 8181 and 81 as the main UnRaid GUI runs on 80 so it was clashing. And this is where I get stuck....when trying to log in to PHPMyAdmin, I get the error "mysqli_real_connect(): php_network_getaddresses: getaddrinfo failed: Name does not resolve". Does anyone have this setup running on their system who can help me with this? I'm a noob when it comes to Docker and my knowledge is limited, but I'm learning more and more each day. I really need PHPMyAdmin so I can administrate databases for my Apache server....I know I could do it CLI, but I'd much rather be able to see the database via a nice GUI. I'm probably missing something really simple! Thanks in advance! 1 Quote Link to comment
Alessandro Posted February 21, 2020 Share Posted February 21, 2020 (edited) I also installed the myphp and maria db dockers. What data did you use to connect to myphp? With username and pass "root" I don't log in Edited February 21, 2020 by Alessandro Quote Link to comment
luhzifer Posted May 17, 2021 Share Posted May 17, 2021 (edited) Hi, sorry for grave robbing on this one, but did you have success with your link to the container? If yes, could you provide your solution? Greets Edited May 17, 2021 by luhzifer Quote Link to comment
cracyfloyd Posted May 19, 2021 Share Posted May 19, 2021 Any Solution. It doesnt work to create the link under UNRAID for me too. How can i fix it? Quote Link to comment
explosionhole Posted February 1, 2023 Share Posted February 1, 2023 I am also having this same issue, and have not found a published solution or thread that discusses this. Initially, I deployed the 2 containers on the default "bridge" network. Connectivity from the PHPMyAdmin container can only use IP addresses here, which causes me a problem with hard-coding. My intention is to have a SINGLE mariadb container, servicing the back-end needs for many other app-based containers. However, in the PHPMyAdmin's config, under "MYSQL_HOST", if I put in `mariadb` it cannot connect. If I put in the assigned MariaDB container's IP, it works. Docker documentation, at this time of writing, states "--link" is deprecated and to use networking configuration to allow this. Using user-defined networks allows name-based resolution as well as IP addresses. This sounds ideal for me! At the main "tower.local" console (from the GUI's top-right options), I issued: docker network create main-net I re-created the MariaDB-Official and PHPMyAdmin containers, both connected to this new `main-net` network. In the PHPMySQLAdmin, I was still specifying "mariadb" (the name of the mariadb container) under the `MYSQL_HOST` field. When I try to connect, it still errors. But if look in the MySQL's log file, I see: Quote Access denied for user 'root'@'172.18.0.3' (using password: YES) Which suggests the correct container (mariadb) IS being hit with the PHPMyAdmin login request. The PHPMyAdmin is specifying the "@'172.18.0.3'" as part of the connection string. To test this, I redeployed the PHPMyAdmin container, hard-coding the `mariadb` container's IP address (172.18.0.2). Now it logs in fine! But I have hard-coded. If I go to the `mariadb` User Accounts section, these are the default users in my setup: I created a NEW user, with a specific "Host name" entry of the PHPMyAdmin container, 172.18.0.3 (to mimic the log file entry I saw). Then I redeploy the PHPMyAdmin container to use the `mariadb` as the MYSQL_HOST entry. Retrying the PHPMyAdmin login, which is now successful. Why is the 'root'@'%' not being applied to my authentication, to cover the scenario of `'root'@'172.18.0.3'`? I thought this was the point of the "%" (basically saying ANY host) configuration? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.