I'm new to spring and trying run a simple spring code and for database it's ms-sql. but it is giving an Exception as dialect issue. here is the code. please look at it
spring.datasource.url=jdbc:sqlserver://localhost;databaseName=login_Demo;trustServerCertificate=true;
spring.datasource.username=sa
spring.datasource.password=Bisht@123
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto = update
spring.jpa.open-in-view=true
server.port=8000
Error is
2022-07-10 09:53:35.322 WARN 5220 --- [ main] o.h.t.s.i.ExceptionHandlerLoggedImpl : GenerationTarget encountered exception accepting command :
Error executing DDL
"create table user
(id integer not null auto_increment,
email varchar(255),
first_name varchar(255),
last_name varchar(255),
password varchar(255),
primary key (id)) engine=InnoDB" via
JDBC Statement org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL
"create table user (id integer not null auto_increment, email varchar(255), first_name
varchar(255), last_name varchar(255), password varchar(255), primary key (id)) engine=InnoDB"
via JDBC Statement
as you are using MSSQL database. So properties are wrong.
for eg.
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialectplease check as per your version first.