Hello!!
I am starting to learn Springboot and I am building a simple CRUD application. I am connecting MySQL DB with Springboot Application, but I am facing the error "Unknown Database: 'testdb' ".
Here is my application.properties file:
spring.datasource.url=jdbc:mysql://localhost:3306/testdb?useSSL=false
spring.datasource.username=root
spring.datasource.password=karan1997
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto=update
Also, the full error, I have pasted in this link: https://textdoc.co/yAGwspHYk0U3alvx
Also, some of the results of the MySQL command I have tried are:
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| karan1234 |
| mysql |
| order-service |
| performance_schema |
| sys |
| testdb |
+--------------------+
mysql> SHOW GLOBAL VARIABLES LIKE 'PORt'
-> ;
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| port | 3306 |
+---------------+-------+
1 row in set (0.00 sec)
Also, I have quickly tried connecting to the DB using Python, so I believe that the issue is not with the incorrect port number or DB name.
Please help me with this!! Thank you!!
A secure web app that allows you to create, edit, share and save text files to your device or to Google Drive as an editable Doc