Skip to content

Commit

Permalink
Merge pull request #7 from earth-artificial-intelligence/formatting-p…
Browse files Browse the repository at this point in the history
…roject-heading

Formatting project heading
  • Loading branch information
saivivek116 authored May 24, 2024
2 parents fde644d + 54a6a56 commit 561dd79
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 14 deletions.
70 changes: 59 additions & 11 deletions content/english/blog/switch-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,21 @@ Ensure PostgreSQL is installed on your system. You can download it from the [off

Open the PostgreSQL shell or use a database management tool like pgAdmin. Run the following commands to create a new database and user:

```shell
psql postgres
```

```sql
CREATE DATABASE geoweaver_db;
CREATE USER geoweaver_user WITH ENCRYPTED PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE geoweaver_db TO geoweaver_user;
CREATE USER myuser WITH PASSWORD 'mypassword';
CREATE DATABASE mydatabase OWNER myuser;
```
- To connect to the database use the below command

```shell
psql -U myuser -d mydatabase
```


enter \q to exit from the postgres shell

### Step 3: Create and Configure application.properties File
Expand Down Expand Up @@ -92,6 +102,22 @@ spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect

### Step 4: Restart Geoweaver
Restart your Geoweaver application to apply the changes. Verify the connection by checking accessing the application.
**Windows**
- Find the PID (Process ID) using the specified port:
```shell
netstat -ano | findstr :8070
```

- Kill the process using the PID found in the previous step:
```shell
taskkill /PID <PID> /F
```

**Linux or Mac**
- Kill the process using below command
```shell
kill -9 $(lsof -t -i:8070)
```

<hr>

Expand All @@ -106,6 +132,10 @@ Ensure MySQL is installed on your system. You can download it from the [official

Open the MySQL shell or use a database management tool like MySQL Workbench. Run the following commands to create a new database and user:

```shell
mysql -u root -p
```

```sql
CREATE DATABASE geoweaver_db;
CREATE USER 'geoweaver_user'@'localhost' IDENTIFIED BY 'your_password';
Expand Down Expand Up @@ -136,11 +166,11 @@ notepad application.properties
- Add the MySQL configuration:

```text
spring.datasource.url=jdbc:mysql://localhost:3306/geoweaver_db
spring.datasource.username=geoweaver_user
spring.datasource.password=your_password
spring.datasource.url=jdbc:mysql://localhost:3306/geoweaver
spring.datasource.username=root
spring.datasource.password=Research-12
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
```

- Save and close the file.
Expand All @@ -164,11 +194,11 @@ nano application.properties
- Add the MySQL configuration:

```text
spring.datasource.url=jdbc:mysql://localhost:3306/geoweaver_db
spring.datasource.username=geoweaver_user
spring.datasource.password=your_password
spring.datasource.url=jdbc:mysql://localhost:3306/geoweaver
spring.datasource.username=root
spring.datasource.password=Research-12
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
```
- Save and close the file by pressing Ctrl + O, then Enter, and exit by pressing Ctrl + X.

Expand All @@ -178,4 +208,22 @@ spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
Restart your Geoweaver application to apply the changes. Verify the connection by checking accessing the application.


**Windows**

- Find the PID (Process ID) using the specified port:
```shell
netstat -ano | findstr :8070
```

- Kill the process using the PID found in the previous step:
```shell
taskkill /PID <PID> /F
```

**Linux or Mac**
- Kill the process using below command
```shell
kill -9 $(lsof -t -i:8070)
```


6 changes: 3 additions & 3 deletions themes/geoweaver/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ <h3 class='font-archivo font-bold tracking-wider text-center'>Why choose <span c
</div>

<div class="flex flex-col py-5 md:py-0">
<div class="px-5 md:px-0">
<h1 class='font-archivo-black text-2xl md:text-3xl tracking-wide text-right'>Projects</h1>
<p class='tracking-wide font-archivo text-right'>that already use <span class='font-bold'>Geoweaver</span></p>
<div class="px-5 md:px-10 pt-4">
<h1 class='font-archivo-black text-2xl md:text-3xl tracking-wide text-left'>Projects</h1>
<p class='tracking-wide font-archivo text-left'>that already use <span class='font-bold'>Geoweaver</span></p>
</div>

<hr class="my-4"/>
Expand Down

0 comments on commit 561dd79

Please sign in to comment.