From 28166dda0a8071932cd6cf0d91ee840017745e0e Mon Sep 17 00:00:00 2001 From: saivivek mac Date: Thu, 23 May 2024 15:22:36 -0400 Subject: [PATCH 1/2] formatting issue --- themes/geoweaver/layouts/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/geoweaver/layouts/index.html b/themes/geoweaver/layouts/index.html index 22a6472..b623931 100755 --- a/themes/geoweaver/layouts/index.html +++ b/themes/geoweaver/layouts/index.html @@ -162,9 +162,9 @@

Why choose
-
-

Projects

-

that already use Geoweaver

+
+

Projects

+

that already use Geoweaver


From 54a6a56835d2d1f91bd27a36d9fcc641e42d3162 Mon Sep 17 00:00:00 2001 From: saivivek mac Date: Thu, 23 May 2024 20:57:09 -0400 Subject: [PATCH 2/2] documentation changes of db switch --- content/english/blog/switch-database.md | 70 +++++++++++++++++++++---- 1 file changed, 59 insertions(+), 11 deletions(-) diff --git a/content/english/blog/switch-database.md b/content/english/blog/switch-database.md index ffd2041..34a8b36 100644 --- a/content/english/blog/switch-database.md +++ b/content/english/blog/switch-database.md @@ -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 @@ -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 /F +``` + +**Linux or Mac** +- Kill the process using below command +```shell +kill -9 $(lsof -t -i:8070) +```
@@ -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'; @@ -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. @@ -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. @@ -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 /F +``` + +**Linux or Mac** +- Kill the process using below command +```shell +kill -9 $(lsof -t -i:8070) +``` +