java - Spring Boot - spring.jpa.hibernate - how to call with sudo? -


i working on project work , way setup mysql server able connect need do

sudo myqsl -p

when try launch spring boot app, fails connect mysql server.. how can tell jpa hibernate call mysql sudo rights? possible ?

i have tried launching spring boot jar sudo , doesn't carry on mysql connection somehow

my application.properties contain credentials

spring.jpa.hibernate.ddl-auto=update spring.datasource.url=jdbc:mysql://localhost:3306/mood spring.datasource.username=user spring.datasource.password=password 

the database mood exists on server , user exist. can connect via ssh without issues, using sudo.

any appreciated!

no, it's not possible connect mysql in jpa sudo rights, should able connect using jdbc connection string:

jdbc:mysql://localhost:portnumber:username:password 

as test, why don't code little class connect database, perform simple select statement , bring result set.

you shouldn't have connect mysql client sudo, infer when "they setup" mean system admins. ask them nicely set mysql client normal command.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -