How to Run/Deploy Spring Boot & MySQL in Docker? | Tech Primers

Тәжірибелік нұсқаулар және стиль

This video covers how to create a Docker image for a Spring Boot App and how to run Spring boot & MySQL in a Docker container
🔗Code in GitHub: github.com/TechPrimers/docker...
📌 Related Playlist
================
🔗Spring Boot Primer - • Spring Boot Primer
🔗Spring Cloud Primer - • Spring Cloud Primer
🔗Spring Microservices Primer - • Spring Microservices P...
🔗Spring JPA Primer - • Spring JPA Primer
🔗Java 8 Streams - • Java 8 Streams
🔗Spring Security Primer - • Spring Security Primer
🔗Containers Primer - • Containers Primer
🔗Kubernetes Primer - • Kubernetes Primer
🔗AWS Primer - • AWS Primer
💥Join TechPrimers Slack Community: bit.ly/JoinTechPrimers
💥Telegram: t.me/TechPrimers
💥TechPrimer HindSight (Blog): / techprimers
💥Website: techprimers.com
💥Slack Community: techprimers.slack.com
💥Twitter: / techprimers
💥Facebook: TechPrimers
💥GitHub: github.com/TechPrimers or techprimers.github.io/
🎬Video Editing: iMovie
🎼Background Music:
fredji
Joakin Karud
---------------------------------------------------------------
🔥 Disclaimer/Policy:
The content/views/opinions posted here are solely mine and the code samples created by me are open sourced.
You are free to use the code samples in Github after forking and you can modify it for your own use.
All the videos posted here are copyrighted. You cannot re-distribute videos on this channel in other channels or platforms.
#Docker #SpringBoot #TechPrimers

Пікірлер: 211

  • @nathandunning
    @nathandunning4 жыл бұрын

    I can't believe how clear, concise and relevant this tutorial was, thank you!

  • @nightfox2607
    @nightfox26072 жыл бұрын

    Wow, impressed by how calmly you explained the entire container setup! This video helped a lot.

  • @ganeshradiga
    @ganeshradiga4 жыл бұрын

    Its just amazing the way you have explained a simple workflow. Thank you very much for your effort.

  • @santhoshg8528
    @santhoshg85284 жыл бұрын

    you are the best "Techprimers" . I never missed any of your videos . keep up your great work bro

  • @tadtab2
    @tadtab25 жыл бұрын

    You made a lot of thing to be clear to me. Thank you!

  • @lokmanboukhoulda4496
    @lokmanboukhoulda44965 жыл бұрын

    This is a very helpful video , thank you!

  • @user-rt1yv9zi8u
    @user-rt1yv9zi8u4 жыл бұрын

    Thank you ! You made a lot of thing to be easy and clear to me!

  • @bahdanshyshkin7918
    @bahdanshyshkin79185 жыл бұрын

    I like this music piece in the beginning :D

  • @nicholasminnelli4823
    @nicholasminnelli48233 жыл бұрын

    Excellent tutorial. You explain the docker CLI commands really well, makes it easy to understand. Thanks!

  • @TechPrimers

    @TechPrimers

    3 жыл бұрын

    Glad it was helpful!

  • @muniswamy3908
    @muniswamy39086 жыл бұрын

    very helpful tutorial keep doing it.

  • @dylanoracle3742
    @dylanoracle37424 жыл бұрын

    Thank you for this tutorial I learn a lot from this.

  • @varapradeepr4429
    @varapradeepr44294 жыл бұрын

    Its clear and explained well. Thank you.

  • @cricketeventsfeed
    @cricketeventsfeed4 жыл бұрын

    Very helpful tutorial. Thank you very much.

  • @rajinisiva4661
    @rajinisiva46614 жыл бұрын

    You made my day.. Really am looking this type of video..keep do more video..

  • @kailashnadh5723
    @kailashnadh57234 жыл бұрын

    clear, practical, best!

  • @youbaraj.p8297
    @youbaraj.p82973 жыл бұрын

    Such a awesome tutorial. WOW.

  • @saitejamalladi
    @saitejamalladi5 жыл бұрын

    So clean. Thanks.

  • @anjimacherla
    @anjimacherla4 жыл бұрын

    Big thanks to Techprimers....i really enjoyed practical implementation of this.

  • @opendojo929
    @opendojo9295 жыл бұрын

    very nice video! thanks!

  • @dayashankarsahuch
    @dayashankarsahuch5 жыл бұрын

    Perfect tutorial

  • @aaroldaaroldson708
    @aaroldaaroldson7086 жыл бұрын

    I like the way you teach. We can see the mistakes and learn from them

  • @MrAndykofi
    @MrAndykofi3 жыл бұрын

    Beautiful, thank you.

  • @raghavishwas
    @raghavishwas6 жыл бұрын

    Thank you Tech Primers. 👍

  • @TechPrimers

    @TechPrimers

    6 жыл бұрын

    +Vishwas Raghav my pleasure Vishwas

  • @santoshkumarsharma5013
    @santoshkumarsharma50134 жыл бұрын

    Thanks. Really helpful.

  • @Praveenezio
    @Praveenezio6 жыл бұрын

    Your videos are awesome. And can you please post a tutorial on autocruise CI CD pipeline with Docker and Jenkins. Thanks!!

  • @ramabookstroremalang9131
    @ramabookstroremalang9131 Жыл бұрын

    Wow you are amazing. Really helps me a lot. thank you!

  • @souravghosh7093
    @souravghosh7093 Жыл бұрын

    Thanks. You cleared lot of my doubts

  • @karunakarverma
    @karunakarverma3 жыл бұрын

    Nice start thanks so much

  • @tech.sunil-info4406
    @tech.sunil-info44065 жыл бұрын

    how to integrate the one dependent microservice into another microservice

  • @HarshGundecha75
    @HarshGundecha754 жыл бұрын

    what if i want to use docker while development is going on so that we can configure it once and any number of developers can be on boarded on same project without hassle of configuring project on their machine. this seems to be for the time when dev. is done and you only need to deploy for client.

  • @dokwme1211
    @dokwme12116 жыл бұрын

    Just in time 🤘🏻

  • @TechPrimers

    @TechPrimers

    6 жыл бұрын

    +Avinash Baghel cheers

  • @majhe8162
    @majhe81622 жыл бұрын

    thank you so much brother ..keep it up ..

  • @MegaOsama99
    @MegaOsama993 жыл бұрын

    Perfect 👌.. Please update this amazing tutorial to 2021

  • @andresgomez7734
    @andresgomez77346 жыл бұрын

    Thanks man

  • @MahadiHasan-qb9zw
    @MahadiHasan-qb9zw3 жыл бұрын

    So much well described, Just loved it

  • @TechPrimers

    @TechPrimers

    3 жыл бұрын

    Glad you liked it!

  • @MahadiHasan-qb9zw

    @MahadiHasan-qb9zw

    3 жыл бұрын

    @@TechPrimers I have tried same as yours but a error said Communication link failure can you help me why this is happening ?

  • @asahikitase5398
    @asahikitase53983 жыл бұрын

    thank you sir!

  • @mohammedshabbir1347
    @mohammedshabbir13473 жыл бұрын

    Very nice explanation 👍.

  • @ChristianAltamiranoAyala
    @ChristianAltamiranoAyala6 жыл бұрын

    A very helpful tutorial. But I prefer to use docker-compose instead link command. Cheers

  • @tamelo

    @tamelo

    5 жыл бұрын

    Do you know a tutorial to make it work? I need to run two Spring app that use the same mysql db. They work fine if I start them separately, but I can´t make them work with compose.

  • @rajeshg9400
    @rajeshg94004 жыл бұрын

    Great tutorial. I am learning lot of concepts which i am unable to get on other sites. I have one clarification. My MySQL database contains lot of tables and relationships. Can we use MySQL query browser(or other UI) to create database and tables and use this database in the docker image.

  • @abdollahsobhy9743
    @abdollahsobhy97436 жыл бұрын

    Hi, I got the following exception: java.sql.SQLException: Unable to load authentication plugin 'caching_sha2_password'. Any help please

  • @thanooj
    @thanooj6 жыл бұрын

    15:30 do we need not to up openjdk container as a seperate container same as MySQL server container ? If not required, from which container it will use java ?

  • @SwapnilNakate7
    @SwapnilNakate74 жыл бұрын

    I am using the docker-compose for the same purpose but when I provide the jdbc connection properties in .properties file. maven build fails for me. Any idea how to resolve this ?

  • @SonuKumar-ee9qp
    @SonuKumar-ee9qp6 жыл бұрын

    how are you running two container i mean one container for mysql and one for spring boot can you explain please i am not able to run my application while connecting with mysql db

  • @tamelo
    @tamelo5 жыл бұрын

    Hello, I´m having trouble making it work with docker-compose. I have two spring-boot apps that access the same mysql database. They all work perfectly without docker, and also work if each app is docked. But not work with compose.

  • @diboracle123
    @diboracle1236 жыл бұрын

    Hi, I have two questions. 1. As you not mounted any Data base file path to docker volume, let's say you created a user record then stop the container and again start it. So what ever the record you saved, it will be wiped out if we do simply a get request to check any user is there or not. let me know if I am wrong or right. 2. In the example you have run only one container of my sql. But in production (in AWS or any cloud) it will be multiple containers (e.g., kubernetes worlds multiple pods of mysql will be running in different hosts and form a service) . I understood you will specify the service name of my sql in application.properties file but when you run the spring boot application as a container what value you will provide --link ??

  • @motolola
    @motolola5 жыл бұрын

    Thanks for the awesome videos, just wondering how to connect to host computer mysql database?

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    instead of the service name, you the hostname in the url

  • @MrOuafine
    @MrOuafine4 жыл бұрын

    how can u communicate from ur local machine with the mysql container without publishing the port ? Thank you for the video.

  • @anirbandebnath4
    @anirbandebnath45 жыл бұрын

    How about using a docker-compose file having both the MySQL and sample project. This way there is no need to wait for the MySQL container to start.

  • @priyankjoshi3018
    @priyankjoshi30184 жыл бұрын

    Hello, why does we see multiple delete messages for an individual image rm command

  • @deepkumarsinghkushwah9052
    @deepkumarsinghkushwah90524 жыл бұрын

    when i am using this same method.... i m getting a unknown host exception

  • @shahidsuri4046
    @shahidsuri40465 жыл бұрын

    Is it better to deploy mysql in its own container? or bundle mysql + jdk app together? What are the pros and cons of each approach..

  • @ADGroupOfArtMedia1
    @ADGroupOfArtMedia15 жыл бұрын

    Crisp and to the point explanation! Sam's salary was too low though. Yupp :-)

  • @sriharsharamkishore
    @sriharsharamkishore5 жыл бұрын

    Hi Can, you please make a video on Run/Deploy Spring Boot & Oracle in Docker

  • @windowcrystal4012
    @windowcrystal40124 жыл бұрын

    Can you do the videos on docker-compose as well?

  • @scm2440
    @scm24403 жыл бұрын

    감사합니다.. ㅠㅠ Thank you

  • @abhikams1
    @abhikams14 жыл бұрын

    If u have created new container from MySQL docker image , how does the user table came into it automatically..? Thanks in advance for the answer

  • @GauravSingh-pr4lj
    @GauravSingh-pr4lj4 жыл бұрын

    hi when i changed localhost to my SQL container service name in application properties file , my project was giving build error on mmaven install, can you please help me with this, is anything else need to be configured??

  • @varunm.v3009
    @varunm.v30095 жыл бұрын

    Nice video..can you pls guide how to call microserices running in differnent containers

  • @arunkumarsanthanam8696
    @arunkumarsanthanam86965 жыл бұрын

    Thanks for your video bro. I am new to the docker. Now I know how to create and deploy simple application in docker container. I have one query, I am seeing people are specifying openjdk as a parent image. It's adding 600 to 1000 MB to my local image depending on the version of jdk. Why we need to add jdk as a parent image. Can we skip the jdk and add jvm as a parent ?. And in real time people are using yml file to define the external dependencies. Can you explain what is the deference between running mysql as a standalone image and other way

  • @shkelqimaliu2174
    @shkelqimaliu21744 жыл бұрын

    Well back in 2017 you had to use the --link argument to make two containers communicate.Nowadays --link is deprecated but you can still use it but in the future it will be completely removed, now you can just use networking capabilities of docker and they will communicate without problem inside a docker network

  • @najdlabben1492
    @najdlabben14922 жыл бұрын

    Thank u so much !!

  • @TechPrimers

    @TechPrimers

    2 жыл бұрын

    You're welcome!

  • @balajimanoharan1716
    @balajimanoharan17164 жыл бұрын

    Good explanation. Can we get video with Docker compose explained

  • @vinayanayak8854
    @vinayanayak88546 жыл бұрын

    Hi, Neatly explained. Small help.Could you please do a video on dockerizing spring boot app +mongodb? Basically, I want to create a MongoDB container and another one for the app and create a network between them and run. I have created the app with spring boot and mongodb but some how I am not able to run it on docker

  • @TechPrimers

    @TechPrimers

    6 жыл бұрын

    sure. will do

  • @personxyz1840
    @personxyz18405 жыл бұрын

    why is it you are not getting mysql image from but only open-jdk. If I have a new docker setup I need to get both openjdk and mysql. can we get that? am I missing anything?

  • @sanjaysheoran008
    @sanjaysheoran0085 жыл бұрын

    I would suggest to create playlist for similar videos which are in parts like create a playlist for Docker and its implementation and add all three videos to it. It will give user a direct access to all part of videos. Otherwise it is difficult to identify the sequence. Thanks.

  • @MrAnasSov
    @MrAnasSov6 жыл бұрын

    Thank you

  • @asimah3959
    @asimah39594 жыл бұрын

    I'm following the tutorial on MacBook Pro but I get below error due to 'unknown host exception' when trying to connect to mysql. Error is as below HikariPool-1 - Exception during pool initialization. com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure Can anyone help with this issue?

  • @antonioshizko6383
    @antonioshizko63836 жыл бұрын

    Docker-compose explanation would be Nice for building linking and running multiple containers

  • @TechPrimers

    @TechPrimers

    6 жыл бұрын

    +Antonio Shizko sure Antonio. Will do

  • @kaushikmn2100
    @kaushikmn21004 жыл бұрын

    For windows users, whom it's not working please use the command: docker-machine ip and then instead of localhost use the machine ip address. Thanks for the amazing explaination.

  • @safeerkhan2837

    @safeerkhan2837

    4 жыл бұрын

    hi, Could you please elaborate. i not able to connect on windows, how to get docker-machine IP?

  • @sparun1607
    @sparun16076 жыл бұрын

    1. Can I run the spring boot from localhost to connect my-sql db available in the container? 2. Or do we really to have the App and DB in the container and link both the container? Since I'm unable to to connect from local system

  • @feiomaskatista

    @feiomaskatista

    4 жыл бұрын

    1. Yes you can!

  • @GlittzGlam7
    @GlittzGlam73 жыл бұрын

    When I do this, I get an error which says "Caused by: java.sql.SQLSyntaxErrorException: Unknown database 'test'". I have checked and made sure that the name of the database is consistent. Is it necessary to make a docker-compose file? Please let me know.

  • @saurabhpresent
    @saurabhpresent6 жыл бұрын

    Very useful, How to stop rebuild process again and again(and directly reflect changes) while in development mode ?

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    you can automate it via script, apart from that we cannot do anything since re-creation of image is necessary

  • @kamalmohansinghrana1381
    @kamalmohansinghrana13812 жыл бұрын

    Whether u r suggesting to have single database shared among all microservices or database and schema per service?

  • @sujithg5873
    @sujithg58733 жыл бұрын

    Bro how can we run docker compose with mysql

  • @levanapakidze1606
    @levanapakidze16063 жыл бұрын

    couple questions, because this didn't go as smooth with me as it did with you. 1. changing localhost to mysql-standalone made building impossible for me, but worked when I returned it back to localhost, what can be the reason for this ? (using mysql:latest as an image) 2. when I build with localhost, it has trouble seeing schemas (containers don't have the same schema configuration I guess), how do I fix this ? (my solution: hibernate.dll-auto=update, but it's still iffy) 3. even if I build with localhost (instead of mysql-standalone) and make an image file, it doesn't run on a second container because of ConnectionRefused exception, when I try running with cmd directly through the jar it works fine, as soon as I try to move it to the container It doesn't like the sql container is my guess, how can I solve all these problems ? >.

  • @jasper5016

    @jasper5016

    2 жыл бұрын

    I faced same issues.

  • @levanapakidze1606

    @levanapakidze1606

    2 жыл бұрын

    @@jasper5016 couldn't figure it out, nor find any source about the subject, so gave up, can't help u with anything, sry

  • @akshaynilkanth9671

    @akshaynilkanth9671

    Жыл бұрын

    HI Levan, i faced same issues few thigs that i tried and worked for me 1.After changing application. Properties file in your app comment the following from src/test/java maine file ------> @Test void contextLoads(){} 2.After creating the image while running it you should link the mysql container too....it is mentioned in the vdo . . .these things should work for you

  • @jeenamanamel6703
    @jeenamanamel67034 жыл бұрын

    Communication link failure and operation create user failed for root @ are the errors Im getting for logs command😔

  • @Chitsgaming
    @Chitsgaming6 жыл бұрын

    I GET THIS WHILE I DO docker build. Step 1/4 : FROM openjdk:8 8: Pulling from library/openjdk no matching manifest for windows/amd64 in the manifest list entries

  • @AjitSamantaSoloTraveller
    @AjitSamantaSoloTraveller5 жыл бұрын

    If my db mysql is installed in another machine and i m accessing through port and host name in that case should i install mysql images?

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    Nope. You need to install only the runtime requirements. You will anyway use MySQL java client which will come in ur jar already

  • @pravsch4742
    @pravsch47423 жыл бұрын

    my container goes to exited state imediately after creating...why?

  • @dheerajbathija0203
    @dheerajbathija02034 жыл бұрын

    Hi, I’m trying to connect to a docker container during development. I’m using eclipse in Macintosh and when I run the spring boot application runner, I’m getting communications link failure error. Can you please suggest what am I missing?

  • @RanjithKumar-qj9mn

    @RanjithKumar-qj9mn

    3 жыл бұрын

    Check SQL docker is running or it may be because of test files ignore it by using the command -> mvnw clean install -Dmaven.test.skip=true good luck

  • @kaischaabane6978
    @kaischaabane69786 жыл бұрын

    Avery helpful , Can you show us how deploy that in Droplet in digitalocean pleaaaaaase

  • @TechPrimers

    @TechPrimers

    6 жыл бұрын

    Hi Kais, is the DigitalOcean providing any free service? I can give it a try

  • @zhenhuahuang8649
    @zhenhuahuang86494 жыл бұрын

    run a docker mysql container.The app spring.datasource.url = jdbc:mysql:mysql-containername:3306 will not recognize the container. mvn package failled because of Caused by: java.net.UnknownHostException: mysql-containername? how can you mvn install and create a jar?

  • @amahant9124
    @amahant91243 жыл бұрын

    where to see our data and how to connect MySQL workbench

  • @abderrahimrafia5583
    @abderrahimrafia55834 жыл бұрын

    Hi When i change localhost to mysql-standalone within the aplication.properties file I couldn't generate my jar cauz of this error : The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

  • @abderrahimrafia5583

    @abderrahimrafia5583

    4 жыл бұрын

    Just skip tests and it ll be fixed

  • @rohithakash8093

    @rohithakash8093

    4 жыл бұрын

    @@abderrahimrafia5583 how do you skip the test

  • @paragkadam2169

    @paragkadam2169

    4 жыл бұрын

    @@rohithakash8093 ./gradlew build --exclude-task test

  • @julioluque302

    @julioluque302

    4 жыл бұрын

    thanks. my project compile now!!!!

  • @julioluque302

    @julioluque302

    4 жыл бұрын

    @@rohithakash8093 mvn install -Dmaven.test.skip=true

  • @shraddhakarle2627
    @shraddhakarle26272 жыл бұрын

    I have error while running localhost:8080 as Failed to load remote configuration. Can anyone help me to figure out this.I tried it too many times but same error...

  • @anirbanroy1524
    @anirbanroy15245 жыл бұрын

    Great useful video. One question can we access the mysql container to see the databases

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    Yes you can

  • @rajeshch1267
    @rajeshch12675 жыл бұрын

    Hi sir nice explained.but some doubts please clarify. 1)when ever spring boot application build after created jar or war.this jar or war file again convert into images and deployed into docker container. 2)why not create maven image. 3)what is difference b/w docker container and docker Engine.

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    1) Yes. Because docker needs its runtime+artifact - so docker image = JRE+JAR or Tomcat+WAR 2) Maven is a build tool, we need runtime middlewares (tomcat/JRE) for our artifacts to run. 3) Docker Container - its like a VM where our processes will be installed/running. Docker Engine - Creates the necessary setup for creating a Docker Container in your laptop/linux machine

  • @gurmeetchawla8362
    @gurmeetchawla83626 жыл бұрын

    could you please do a video on aws and spring boot

  • @TechPrimers

    @TechPrimers

    6 жыл бұрын

    Hi Gurmeet, I have done it already. Take a look at here: kzread.info/dash/bejne/aIam09uthJOTeZs.html

  • @mousumisaha4525
    @mousumisaha45253 жыл бұрын

    If I have a RDS and spring boot is running inside an EC2 machine then how will I give Mysql credentials using docker run.

  • @TechPrimers

    @TechPrimers

    3 жыл бұрын

    You can pass via env file or using vault. For env file, there is a -env parameter. Check docker command help

  • @AnkitKumar-ov7ix
    @AnkitKumar-ov7ix3 жыл бұрын

    I'm gettong this error "The driver has not received any packets from the server."

  • @kumargaurav7044
    @kumargaurav70446 жыл бұрын

    Using 'mysql-standalone' as host address inside the application.properties in spring-boot project caused compilation errors during 'mvn clean install' for JAR creation spring.datasource.url=jdbc:mysql://mysql-standalone:3306/test1 Log says 'unknown host exception' Further, I identified the IP address of the running mysql container ('mysql-standalone') using 'docker inspect ' and then used it inside the application.properties to make it working I am not sure but I can't rely on IP Address since this could change next time. Below is the working settings- spring.datasource.url=jdbc:mysql://172.17.0.2:3306/test1

  • @safeerkhan2837

    @safeerkhan2837

    4 жыл бұрын

    Hey, did you find solution to this?

  • @bouzidimaha
    @bouzidimaha5 жыл бұрын

    Do we need always to delete image and to build a new one to see the code changes ?? does someone have any other Idea ?

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    Yes you have to rebuild always

  • @anil0407
    @anil04075 жыл бұрын

    How can i run the second container instance of the spring boot application

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    you can trigger same docker run with different ports

  • @dileepalla6769
    @dileepalla67696 жыл бұрын

    can u explain properties vs yaml

  • @TechPrimers

    @TechPrimers

    6 жыл бұрын

    +dileep Alla sure. Creating a video on that

  • @aaronmaru
    @aaronmaru4 жыл бұрын

    when i build jar file, I got Communications link failure. i think because we change from localhost to mysql-standalone? how to fix this?

  • @alimemon9942

    @alimemon9942

    4 жыл бұрын

    I ran into the same problem after watching this video. Here is the fix stackoverflow.com/questions/59626144/docker-mysql-communication-link-failure

  • @GauravSingh-pr4lj

    @GauravSingh-pr4lj

    4 жыл бұрын

    @@alimemon9942 thanx a lot , i was having the same issue

  • @julioluque302
    @julioluque3024 жыл бұрын

    Excelent.... the next step is, deploy to cloud.... are you this video? thanks

  • @garym993
    @garym9934 жыл бұрын

    Hello Sir, at 15:25 I am getting 'Communication Link Failure'. For me all the steps before 15:25 worked fine. Please help!!

  • @alimemon9942

    @alimemon9942

    4 жыл бұрын

    Here is a fix stackoverflow.com/questions/59626144/docker-mysql-communication-link-failure

  • @tejasmahajan4040
    @tejasmahajan40405 жыл бұрын

    Nice video, many thing got cleared, Can you please help me one step ahead - I want data even for some MySQL server goes down, still I can get my data back?

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    You need to take backup and store it outside to restore it back

  • @dheerajscorefitness6981
    @dheerajscorefitness69813 жыл бұрын

    I am getting unknown database error, can someone please help ?🙂🙏

  • @Grgarowing
    @Grgarowing5 жыл бұрын

    Can you explane me how did you componse jdbc:mysql://mysql-standalone:3306/test? Is the mysql-standalone the name of the mysql container or from where? ( this is the only part I dont't undestand). Awsome video! Keep going

  • @Grgarowing

    @Grgarowing

    5 жыл бұрын

    I have coded a similar application just with postgres. The problem now is when I define jdbc:mysql://mysql-standalone:3306/test with local host instead of mysql.... it works fine untlil the spring boot application is localy runed. When I rune it from a docker container it cannot find the database.

  • @TechPrimers

    @TechPrimers

    5 жыл бұрын

    Hi Greg, Yes. mysql-standalone in the docker container name. For postgres, you will have to use a different url (since you need different JDBC driver which supports postgres). Eg something like this - jdbc:postgresql://:/

  • @Grgarowing

    @Grgarowing

    5 жыл бұрын

    Tech Primers thanks 😀

Келесі