Open Bilal05476 opened 1 year ago
Hi, can you tell me more about your other configuration too? What is the MySQL port you selected?
Hi, can you tell me more about your other configuration too? What is the MySQL port you selected? port no : 3306
Use the below code for docker-compose.yml it will fix above error : version: '3.9' services:
flask-app: container_name: 'flask-python-application' build: context: . ports:
'5000:5000' environment: MYSQL_HOST: 'mysql-db' MYSQL_USER: 'root' MYSQL_PASSWORD: 'root' MYSQL_DB: 'devops' depends_on: mysql-db: condition: service_healthy
mysql-db: container_name: 'mysql-db' image: 'mysql:5.7' ports:
volumes: mysql-volume-data:
please use mysql ip in two-tier-app-deployment.yaml file so that it work fine.
OperationalError MySQLdb.OperationalError: (2002, "Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)")
Both containers in same network but above error persist