UniTime / unitime

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

Error at login page. #174

Closed vaibhavi012 closed 1 month ago

vaibhavi012 commented 1 month ago

Not able to figure out the error at login.

unitime issue

tomas-muller commented 1 month ago

The problem is that UniTime is not able to connect to the database:

java.sql.SQLException: Access denied for user 'timetable'@'localhost' (using password: YES)

You can try to connect to the database as the timetable user using mysql tool with the following options (also trying to use the same port and protocol as the UniTime application):

mysql --user=timetable --password=unitime --port=3306 --host=localhost --protocol=TCP timetable

If you are able to connect to mysql with "mysql -utimetable -punitime timetable" but not with "mysql --user=timetable --password=unitime --port=3306 --host=localhost --protocol=TCP timetable", the problem could be that TCP/IP networking is disabled.

This assumes that you have created the timetable database (using schema.sql) and populated it either with blank-data.sql or wobegon-data.sql, and that you are using the default credentials (username timetable, password unitime).

That said, if you need to change the database connection properties, including the connection credentials, you can put the new properties in the catalina.properties file (typically something like /etc/tomcat9/catalina.properties), or you can put them to a separate unitime custom properties file. In the second case, you just need to put one line in the catalina.properties pointing to the unitime custom properties file, for example:

tmtbl.custom.properties=/etc/tomcat9/unitime.properties

and put the connection properties in the /etc/tomcat9/unitime.properties. For example:

connection.url=jdbc:mysql://localhost:3306/timetable?serverTimezone=Europe/Prague&useSSL=false&allowPublicKeyRetrieval=true
connection.driver_class=com.mysql.cj.jdbc.Driver
connection.username=timetable
connection.password=FIXME
default_schema=timetable
dialect=org.hibernate.dialect.MySQLInnoDBDialect
tmtbl.uniqueid.generator=org.hibernate.id.TableHiLoGenerator

More details are available at help.unitime.org/installation#customization.

vaibhavi012 commented 1 month ago

Thank you @tomas-muller . Issue got resolved.

vaibhavi012 commented 1 month ago

Hello @tomas-muller , After clicking the buttons like update or save while creating course timetables, I am getting the following error saying " could not extract ResultSet ". ResultSet error Could please help me with this error?

tomas-muller commented 1 month ago

Is there any error in the Tomcat log?

Also, what version of UniTime are you using? If it is 4.1, could you update it to the latest 4.7 or 4.8 and try again?

vaibhavi012 commented 1 month ago

Yes, there is error in Tomcat log. Currently i am using 4.1_bld231 version. If I am updating to lastest version then i am not able to see the login page i get 404 not found error at login page. Also the lastest versions are not getting compatible with MySQL JDBC connector .

tomas-muller commented 1 month ago

Why are you creating a new issue with the same question?

Following up in issue #175.

vaibhavi012 commented 1 month ago

The issue #174 showed up as closed so i created the new issue.