Skip to content

Commit b936130

Browse files
committed
atulyw | README updated
1 parent fc74e5f commit b936130

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

README.md

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
1-
# java-project
2-
Angular frontend, Springboot backend, MySQL db
1+
# Installing MariaDB, Setting Password, and Importing Database on Ubuntu Linux
32

3+
This guide will walk you through the process of installing MariaDB on Ubuntu Linux, setting a password, and importing a database from a SQL file. MariaDB is a popular open-source relational database management system, and it's commonly used in web development environments.
44

5-
I used Angular 14, Spring Tool Suite 4 with Java 8, and MySQL Workspace to setup the database.
5+
## Setup MariaDB and Import MySQL
6+
7+
Before installing any new software, it's essential to update the package lists to ensure you're getting the latest versions available.
8+
9+
```bash
10+
sudo apt update
11+
sudo apt install mariadb-server
12+
sudo systemctl start mariadb
13+
sudo systemctl enable mariadb
14+
sudo mysql_secure_installation
15+
sudo mysql -u root -p
16+
```
17+
```sql
18+
CREATE DATABASE springbackend;
19+
GRANT ALL PRIVILEGES ON springbackend.* TO 'username'@'localhost' IDENTIFIED BY 'your_password';
20+
```
21+
22+
### Import Database from SQL File
23+
```bash
24+
sudo mysql -u username -p springbackend < springbackend.sql
25+
```
26+
```bash
27+
sudo mysql -u root -p
28+
```
29+
```sql
30+
show databases;
31+
show tables;
32+
select * from tbl_workers;
33+
```

0 commit comments

Comments
 (0)