Unable to connect to Database server from inside the docker container after the data base restart

Unable to connect to Database mysql server (v 5.7.30) from inside the docker container after the database restart.

Docker version 19.03.8, build afacb8b
docker has container ubuntu:18.04
openjdk-8-jdk is installed

java.net.UnknownHostException: xxxxx.xxx.xxxTemporary failure in name resolution
! at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
! at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
! at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1330)
! at java.net.InetAddress.getAllByName0(InetAddress.java:1283)
! at java.net.InetAddress.getAllByName(InetAddress.java:1199)
! at java.net.InetAddress.getAllByName(InetAddress.java:1127)
! at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:243)
! at com.mysql.jdbc.MysqlIO.(M

/home/docker[ 32 ] → docker exec -it xxxprod bash
root@84f95f3c0ac7:/src# ssh xxxxx.xxx.com
ssh: Could not resolve hostname xxxxx.xxx.com: Temporary failure in name resolution