A blog by J. Weyh
Following yesterday's plan, I spent my day trying to set up my project's connection to a real database.
As expected, I ran into a couple of technical issues. For the first two hours I struggled with establishing a connection to the database. It turned out that the port to the database was closed. Even after asking Opa to open the port, I still couldn't connect to the database - until we realized that Opa has to allow remote access to the database manually. Once he did, IntelliJ's error messages finally started changing. After a few login issues, IntelliJ finally stopped complaining about the connection and started complaining about my SQL code instead.
I had a lot of trouble with creating the table in my database from my IntelliJ project - in the end, as so often the solution was simple: my schema.sql file that is responsible for the table creation if none yet exists lacked the database as its source. After setting this up and correcting a lot of my SQL code to have a "MariaDB accent" (I'm a total SQL noob!), my application finally started and kept running without error.
I have to admit - my heart was pounding when I refreshed my database GUI in phpMyAdmin. Then - release ... not only had my table been created, it was also filled with the correct data! I was so happy, I had tears in my eyes. This emotional high went even higher when I tested if my Postman requests were still working - and they were! Updating an entry in Postman updated the entry in the database. Watching this happen live, knowing that I had set up all of this as a beginner - that was one of my happiest moments in 2026.
Now I cannot wait to get started with my actual project. Next, I will learn how to bring Thymeleaf into the mix to allow for a rudimentary frontend for my application, because I cannot wait to establish a connection between my Java code, my frontend and my database via Spring!!!