Connect to localDB with windows authentication

天大地大妈咪最大 提交于 2020-06-27 06:18:14

问题


This is the first time that I try to create a local DB to use for my spring boot application so it might be an easy thing to fix that Ive missed.

What ive done so far:

  • Downloaded SQLExpress
  • Logged with SSMS using windows authentication
  • Created a database
  • Connected to the new database using HeidiSQL

After all this steps ive tried to setup a connection with my spring boot app using the following properties:

spring.datasource.url= jdbc:sqlserver://localhost:3306
spring.datasource.username=
spring.datasource.password=

spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto= update

However when I start the application there is an error since it cant find username ''.

I've tried all kind of username but I always get this error:

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user: 'FRANA'.

At this point I remembered that I had to create a new user and add all access to the DB, so I went back to HeidiSQL and selected the icon to add a User.

Sadly when I click on that i get the following error:

Cannot find stored procedure 'FLUSH'

I'll add also some picture of my configration in SSMS/HeidiSql so that you can see if something is wrong with my setup.

How I connect to HeidiSQL

How I connect to SSMS

My Database configuration/Users on SSMS

Registered Servers on SSMS (I dont know if you need this)

NOTE: I can connect to the DB using HeidiSQL without any error so yes, my server should be running.

来源:https://stackoverflow.com/questions/62371029/connect-to-localdb-with-windows-authentication

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!