0
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/mydatabase</property>
<property name="hibernate.connection.username">root</property>

What will come at the place of localhost when I have database on 192.***.***.*** with HTTPS connection?

seenukarthi
  • 8,241
  • 10
  • 47
  • 68
Ravi Chhatrala
  • 324
  • 4
  • 14

1 Answers1

0

You will need to put the url of your remote server followed by the port number separated by colon. You will also have to make sure that MySQL db on remote server has permission to allow establishing connection with your local server.

So basically add a user with privileges of your choice using mysql commands CREATE USER and GRANT.

you can view the mysql user table to see what users exist (this shows only some columns though):

select host,user,password from mysql.user;

One of the host should be ip of the local machine. Finally the bind-address property in mysql configuration file should be changed on remote server.

Make sure you restart mysql after applying all the changes.