• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Resolved How to configure Plesk databases to allow access from Plesk docker container

milanbx

New Pleskian
Server operating system version
Debian 12.11
Plesk version and microupdate number
Plesk Obsidian v18.0.69_build1800250502.08
Hi, I am running Plesk Obsidian v18.0.69_build1800250502.08 on Debian 12.11 with Docker extension. And I would like to use Plesk databases from my Docker container applications. Let's say, I have a Docker container in Plesk Docker service and the container runs a PHP application. And I would like this application to use the database in Plesk.

How to configure the database server in Tools & Settings > Database Servers > Settings, so that it become accessible from Docker container?
What is the right choice in Default settings for remote access of MariaDB/MySQL database users:
a) Allow local connections only​
b) Allow remote connections from any host​
c) Allow remote connections from​

And how to access the database from the Docker container? Should I use the special DNS name in each container `host.docker.internal` and the port assigned to my Plesk DB server?

Thanks for any ideas.
 
Please find the instructions on how to allow MySQL connections here. You will also need to make sure the bind-address is set to 0.0.0.0. On Debian, that should be defined in /etc/mysql/my.cnf.
 
OK, thank you, however, correct me , if I am wrong, but allowing *local MySQL server to accept external connections* will allow the DB to be accessed from other servers/internet as well, doesn't it?
Thank you, you may, however, close this ticket.
 
Hi, sorry for opening this case again, but I would like to increase protection of the DB by any possible way. And I am thinking about changing the default port DB is listening at. How to do so properly?
Thank you.
 
Please find the instructions on how to allow MySQL connections here. You will also need to make sure the bind-address is set to 0.0.0.0. On Debian, that should be defined in /etc/mysql/my.cnf.
Well, I have followed the steps given in the article you refer to, checked Allow local MariaDB/MySQL server to accept external connections in Tools & Settings > Database Servers > Local MariaDB/MySQL server, I have also selected Allow remote connections from any host both for the server and the database user I am using for the particular database, but my application running in Docker container is still not able to connect to the database using host.docker.internal as DB server hostname. I have also changed the bind-address=0.0.0.0 in /etc/mysql/my.cnf. Nothing helped.
Any idea?
Thank you.
 
Back
Top