- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
Connect Database on EC2 to spring boot In 1 GO (Step by Step)
How to Install and Connect PostgreSQL deployed on EC2 to spring boot and dbeaver | How to Install PostgreSQL in AWS EC2 | How to install PostgreSQL in EC2 instance | How to Install PostgreSQL in AWS EC2 in 3 Simple Steps [2025]
This video provides a step-by-step guide on how to connect a database on an Amazon AWS EC2 instance to a Spring Boot application. We will cover the process of setting up a PostgreSQL database on an EC2 instance, installing pgadmin 4, and configuring the database connection. The tutorial also covers the installation of PostgreSQL on an EC2 instance, setting up a Postgresql database, and connecting to it using a tool like Dbeaver. By the end of this video, you will have a clear understanding of how to connect a PostgreSQL database on an EC2 instance to a Spring Boot application, and be able to run your application with a database on the AWS cloud. The video is designed to be a comprehensive Spring Boot tutorial, covering topics such as EC2 Postgresql setup, EC2 Postgresql run, and connecting Postgresql to a Spring Boot application. The tutorial is perfect for those looking for an AWS tutorial, or a Postgresql tutorial, and want to learn how to set up a database on an EC2 instance and connect it to a Spring Boot application. The video covers the process of installing Postgresql on an EC2 instance, setting up a Postgresql database, and connecting to it using a Linux server, making it a valuable resource for those looking to learn about database setup and configuration on the AWS cloud.
---------------------
Chapters:
00:00 - 02:54 -Create and launch a EC2 instance
03:00 - 06:20 - Install the PostgreSQL 15 database
06:21- 07:52 - Connect to PostgreSQL DB from External Client
07:53- 15:00 - PostgreSQL and AWS Configuration and Dbeaver Connection
15:01- 17:10 - Spring boot Connection with PostgreSQL
---------------------
Steps to install PostgreSQL in EC2:
Step 1. Create and launch a EC2 instance
Step 2. Install the PostgreSQL 15 database
a. Update system packages
sudo yum update -y
b. Install PostgreSQL 15
sudo yum install postgresql15 postgresql15-server -y
c. Initialize the database
sudo postgresql-setup --initdb
d. Start and enable the PostgreSQL service
sudo systemctl start postgresql
sudo systemctl enable postgresql
Step 3. Connect to PostgreSQL DB and test
Switch to the `postgres` user and access `psql`
sudo su - postgres
psql
select * from pg_stat_activity;
to list all databases
\l
to connect to database postgres
\c postgres
select * from pg_stat_activity;
set password inside psql
ALTER USER postgres WITH PASSWORD 'root';
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
Видео Connect Database on EC2 to spring boot In 1 GO (Step by Step) канала Debugger
This video provides a step-by-step guide on how to connect a database on an Amazon AWS EC2 instance to a Spring Boot application. We will cover the process of setting up a PostgreSQL database on an EC2 instance, installing pgadmin 4, and configuring the database connection. The tutorial also covers the installation of PostgreSQL on an EC2 instance, setting up a Postgresql database, and connecting to it using a tool like Dbeaver. By the end of this video, you will have a clear understanding of how to connect a PostgreSQL database on an EC2 instance to a Spring Boot application, and be able to run your application with a database on the AWS cloud. The video is designed to be a comprehensive Spring Boot tutorial, covering topics such as EC2 Postgresql setup, EC2 Postgresql run, and connecting Postgresql to a Spring Boot application. The tutorial is perfect for those looking for an AWS tutorial, or a Postgresql tutorial, and want to learn how to set up a database on an EC2 instance and connect it to a Spring Boot application. The video covers the process of installing Postgresql on an EC2 instance, setting up a Postgresql database, and connecting to it using a Linux server, making it a valuable resource for those looking to learn about database setup and configuration on the AWS cloud.
---------------------
Chapters:
00:00 - 02:54 -Create and launch a EC2 instance
03:00 - 06:20 - Install the PostgreSQL 15 database
06:21- 07:52 - Connect to PostgreSQL DB from External Client
07:53- 15:00 - PostgreSQL and AWS Configuration and Dbeaver Connection
15:01- 17:10 - Spring boot Connection with PostgreSQL
---------------------
Steps to install PostgreSQL in EC2:
Step 1. Create and launch a EC2 instance
Step 2. Install the PostgreSQL 15 database
a. Update system packages
sudo yum update -y
b. Install PostgreSQL 15
sudo yum install postgresql15 postgresql15-server -y
c. Initialize the database
sudo postgresql-setup --initdb
d. Start and enable the PostgreSQL service
sudo systemctl start postgresql
sudo systemctl enable postgresql
Step 3. Connect to PostgreSQL DB and test
Switch to the `postgres` user and access `psql`
sudo su - postgres
psql
select * from pg_stat_activity;
to list all databases
\l
to connect to database postgres
\c postgres
select * from pg_stat_activity;
set password inside psql
ALTER USER postgres WITH PASSWORD 'root';
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
Видео Connect Database on EC2 to spring boot In 1 GO (Step by Step) канала Debugger
amazon aws spring boot tutorial EC2 Postgresql run EC2 Postgresql setup EC2 mysql aws aws tutorial database database on ec2 install postgreSQL in EC2 instance install postgresql install postgresql on aws ec2 pgadmin 4 postgres tutorial postgresql postgresql ec2 postgresql tutorial Connect Postgresql aws cloud connect postgresql dbeaver install postgressql linux server postgres connection postgressql setting postgresql setup postgresql spring boot
Комментарии отсутствуют
Информация о видео
2 ноября 2025 г. 17:15:06
00:17:10
Другие видео канала

![MASTERCLASS on Spring Boot Deployment to AWS EC2 - The Easy Way [2025]](https://i.ytimg.com/vi/eo_eUTm459Q/default.jpg)





![Deploy React App to AWS for Free in 4 Simple Steps [2025]](https://i.ytimg.com/vi/RBZhEIMc5XQ/default.jpg)

![Get PostgreSQL Up and Running on EC2 in 3 Simple Steps [Must Watch]](https://i.ytimg.com/vi/UZPStin2YBk/default.jpg)







![Publish App To Google Play Store [2026] : Complete Process [Step 0]](https://i.ytimg.com/vi/qFOhKuxK_MI/default.jpg)


