Загрузка...

The PostgreSQL EC2 to Spring Boot Connection Blueprint

Connect PostgreSQL on EC2 to Spring Boot [Must watch for DEVELOPRS]

Related videos:
5 Simple Steps to Deploy Spring Boot Application to AWS EC2 using Github Actions: https://youtu.be/gsg0look3ts
To Learn How to connect the Postgresql installed on EC2 from Dbeaver, pgadmin and springboot, Check this video: https://youtu.be/EnehOG7KJ80
To connect to EC2 instance in 1 minute: https://youtu.be/thNbIihnVa4
To SSH into EC2 instance: https://youtu.be/xA1C1PKdWG0

If you are looking for how to Connect PostgreSQL deployed on EC2 to spring boot and dbeaver?
Learn how to connect PostgreSQL on EC2 to Spring Boot and DBeaver, a crucial step in deploying your Java application on the AWS cloud. This tutorial covers the entire process, from setting up an EC2 instance on AWS to installing PostgreSQL on the Linux server. You will also learn how to SSH into your AWS EC2 instance and configure it to work with your Spring Boot application. Additionally, we will explore how to connect PostgreSQL to DBeaver, a popular tool for database management, and pgadmin, another useful tool for managing your PostgreSQL database. By the end of this video, you will have a comprehensive understanding of how to deploy your application on AWS EC2, connect to your PostgreSQL database, and manage it using DBeaver. This is an essential skill for anyone looking to work with cloud computing, especially those interested in AWS certification and Java development. The video also covers the benefits of using PostgreSQL on EC2 and how it can improve your application's performance and scalability. Whether you are a beginner or an experienced developer, this tutorial will provide you with the knowledge and skills you need to successfully connect PostgreSQL on EC2 to Spring Boot and DBeaver.
---------------------
Chapters:
00:00 - 01:00 - Introduction and prerequisite
01:01 - 03:09 - Connect EC2 and update postgres password
03:10 - 04:10 - PGadmin and Dbeaver configuration
04:11 - 09:08 - PostgreSQL configuration changes
09:09 - 10:09 - Update AWS Security group
10:10 - 11:10 - Connect to DB through Dbeaver and test
11:11 - 13:14 - DB Spring boot connect and test

---------------------

Prerequesites:
- Download and install pgadmin or dbeaver

Step 1: Connect to EC2 and verify the username database and password
sudo su - postgres
psql
ALTER USER postgres WITH PASSWORD 'root';

Step 2: Update configuration of postgres
a) update postgresql.conf to allows incoming connections on all available IP interfaces.
listen_addresses = '*'

b) update pg_hba.conf file to allow all ip to be authorized
host all all 0.0.0.0/0 md5

:q to quit and :wq to save and exit from vi

Step 3: Restart the postgresql
sudo systemctl restart postgresql
to check status
sudo systemctl status postgresql

Step 4: Update Security Group of AWS to allow 5432 port, add postgres rule in inbound rules

Step 5: Test in Dbeaver or pgadmin

Step 6: Test in springboot

spring.datasource.url=jdbc:postgresql://(EC2-Public-IP):5432/(your_database)
spring.datasource.username=postgres
spring.datasource.password=(your_password)
spring.datasource.driver-class-name=org.postgresql.Driver

# Optional: JPA settings
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

add dependencies
a) spring-boot-starter-data-jpa
b) postgresql

#postgresqltutorial #postgres #postgresql #ec2 #aws #instance #database #cloud #cloudcomputing #awsdeveloper

Видео The PostgreSQL EC2 to Spring Boot Connection Blueprint канала Debugger
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять