UniTime / unitime

Comprehensive University Timetabling System
http://www.unitime.org
Apache License 2.0
283 stars 163 forks source link

how to connect UniTIme server to another server database mysql?? #102

Closed Abdulaziz-KTA closed 2 years ago

Abdulaziz-KTA commented 2 years ago

how to connect UniTIme server to another server database mysql?? I want to connect the database to another server for data security and controlled by the database team

tomas-muller commented 2 years ago

See the Customization section of the UniTime Installation document.

The database connection can be changed using custom properties. However, please note that these properties cannot be defined using the UniTime application (Administration / Defaults / Configuration menu item) since the database connection needs to be configured before the database can be accessed. For instance, custom.properties file can contain:

# MySQL Configuration Example
connection.url=jdbc:mysql://localhost:3306/timetable?serverTimezone=Europe/Prague
connection.username=timetable
connection.password=unitime
connection.driver_class=com.mysql.jdbc.Driver
dialect=org.hibernate.dialect.MySQLInnoDBDialect
tmtbl.uniqueid.generator=org.hibernate.id.TableHiLoGenerator
default_schema=timetable
Abdulaziz-KTA commented 2 years ago

I do that not work inside this "C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps\UniTime.war\WEB-INF\lib\timetable.jar\application.properties" this is correct??

tomas-muller commented 2 years ago

No, that is not correct. Please read the documentation. You can create a custom properties file outside of the UniTime.war file, for example C:\Program Files\Apache Software Foundation\Tomcat 8.5\conf\unitime.properties and put all these properties in there. For this file to be loaded by UniTime, you need to add the following line in the C:\Program Files\Apache Software Foundation\Tomcat 8.5\conf\catalina.properties:

tmtbl.custom.properties=C:\\Program Files\\Apache Software Foundation\\Tomcat 8.5\\conf\\unitime.properties

This is also mentioned in the UniTime Windows installation document, section 5c.

Abdulaziz-KTA commented 2 years ago

thank you now is work.