Support Questions
Find answers, ask questions, and share your expertise

Ranger uses wrong JDBC connection string

Ranger uses wrong JDBC connection string

Explorer

Hi all,

Although I specified this connection string jdbc:mysql://"myhostnamehere":3306/ranger?serverTimezone=UTC

when I test the database connection it returns "ok" when I start Ranger service it gives:

 

2020-06-19 17:48:44,467  [I] DB FLAVOR :MYSQL
2020-06-19 17:48:44,468  [I] --------- Verifying Ranger DB connection ---------
2020-06-19 17:48:44,468  [I] Checking connection..
2020-06-19 17:48:44,468  [JISQL] /usr/jdk64/jdk1.8.0_112/bin/java  -cp /usr/hdp/current/ranger-admin/ews/lib/mysql-connector-java-8.0.20.jar:/usr/hdp/current/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://"myhostnamehere"/ranger -u 'ranger' -p '********' -noheader -trim -c \;  -query "select 1;"
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
SQLException : SQL state: 01S00 java.sql.SQLException: The server time zone value 'CEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the 'serverTimezone' configuration property) to use a more specifc time zone value if you want to utilize time zone support. ErrorCode: 0
2020-06-19 17:48:45,328  [E] Can't establish connection!! Exiting..
2020-06-19 17:48:45,328  [I] Please run DB setup first or contact Administrator..

 

Any ideas?

 

Don't have an account?