Issue
So i wanted to make a simple CRUD apps and i used the MYSQL Workbench for the database . My connection in MySQL Workbench
Hostname : 127.0.0.1
Port : 3306
I don't use password in MySQL Workbench.
and now my application properties looks like this
spring.datasource.url=jdbc:mysql://localhost:3306/employee_management_system?useSSL=false
spring.datasource.username=root
spring.datasource.password=
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
spring.jpa.hibernate.ddl-auto=update
The error that i'm getting
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "create table employees (id bigint not null auto_increment, email_id varchar(255), first_name varchar(255), last_name varchar(255), primary key (id)) type=InnoDB" via JDBC Statement
and another one at the bottom part
Caused by: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'type=InnoDB' at line 1
Please can someone help ?
Solution
I think your database does not support the InnoDB engine. Try to replace
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
by
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
Answered By - AbuBaker Hmad
Answer Checked By - Candace Johnson (JavaFixing Volunteer)