Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29243

Table Doesn't exist in RDS MYsql Database deployed with MySql docker

$
0
0

I'm running a simple Spring Boot- MySql application with AWS's RDS MySql Databse which is running correctly in local tomcat.

But when i deploy the Application with docker in aws instance i'm getting error as

Table 'test_docker_db.product_info' doesn't exist

I have created a docker network , a MySql Container and my application container in docker .

Command i used to start my application is

sudo docker container run --network my-network-name  --name myAppName-p 80:8080 -d my-docker-image:latest

My application.yml is

spring:  datasource:    driver-class-name: com.mysql.cj.jdbc.Driver    username: root    password: root    url: jdbc:mysql://myRdbsDatabaseUrl:3306/test_docker_db?zeroDateTimeBehavior=convertToNull   jpa:    show-sql: false     hibernate:      ddl-auto: none     properties:      hibernate:        temp:          use_jdbc_metadata_defaults: false;        dialect: org.hibernate.dialect.MySQL5Dialect

This configuration is working fine when running in tomcat.

But when deployed in AWS as docker table doesn't exist error occurs.

I have checked the docker's mysql Container about the details of the tables which show as

mysql> use test_docker_dbDatabase changedmysql> show tables;Empty set (0.00 sec)

Someone please explain me what i'm missing .Thnaks in advance.


Viewing all articles
Browse latest Browse all 29243

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>