Spring Boot JPA - Connect to MySQL Database in a Docker Container

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

Комментарии • 14

  • @maheshvshet
    @maheshvshet 4 месяца назад

    Short and Sweet. Good content. Thank you!!

    • @Randomcode_0
      @Randomcode_0  4 месяца назад

      Glad you liked it! I try to be concise and to the point.

  • @pooja.sahu95
    @pooja.sahu95 3 месяца назад

    Thank you so much. Short n simple

  • @vsch7887
    @vsch7887 Год назад +1

    Since Spring 4.3 you don't need @Autowired for constructor injection, just use the constructor

    • @Randomcode_0
      @Randomcode_0  Год назад +1

      You are very much right, I still add the annotation in most of my videos to clearly showcase what is happening. As I think dependency injection is an important concept to understand, and I think it might be a bit harder to understand at first when it is just known it will be autowired.

  • @razvannechifor365
    @razvannechifor365 Год назад

    Thank you 🤩 this is so helpful

  • @KnightHavel
    @KnightHavel Год назад

    Thank you brother, just saved my day God bless you forever!

  • @puzzeled009
    @puzzeled009 Год назад +2

    Having trouble to connec to myslq - getting sql exception when trying to run application Access denied for user 'root'@'host' (using password: YES)

  • @sugoi5240
    @sugoi5240 10 месяцев назад

    had no idea you could use the yml file inside intellij, i was running the container seperately in docker and it gave me an error, no clue why.

  • @Summer0771
    @Summer0771 2 года назад

    Hi, no data is being added to the database (the databases and tables are being created, but no insert statements are being executed).

    • @Randomcode_0
      @Randomcode_0  2 года назад

      I would try to run the docker setup, then go into the docker container and run your inserts manually to check everything is working as intended.
      Use: docker exec -it /bin/bash
      To get into the container, and then inside the container use:
      mysql -ppass -uroot
      To get into the MySQL database, you can then copy and paste an insert statement to see if everything is working, and you can then use normal SQL to navigate inside MySQL.
      Common MySQL commands:
      Show databases;
      Use ;
      Show tables;
      Select * from