mysql - Docker, How to get a container IP inside another container in PHP?
one text
Solution:
Try this:
$conn = mysqli_connect(
'mysql', // here goes your mysql container name
$user,
$pass,
$database
);
Sourceone text
Try this:
$conn = mysqli_connect(
'mysql', // here goes your mysql container name
$user,
$pass,
$database
);
Source