mysql

Unable to connect with MYSQL database.

Error:


Unknown character set index for field '255' received from server. (or)
Unknown initial character set index '255' received from server.

Note:
  1. This is not specific to any build of Zoho Analytics Onpremise.
  2. This fix is for MYSQL version 8 and below.

Analysis:
The customer's MySQL version to be higher than the version which is in our product.

Solution:
  1. Stop the Zoho Analytics Server service.
  2. Move the <Zoho Home>/Analytics/lib/mysql_connector.jar to <Zoho Home>/Analytics/Backup/
  3. Download the latest MySQL jar from this link.
  4. Extract it and rename mysql-connector-java-8.0.17.jar to mysql_connector.jar.
  5. Move the renamed jar file to  <Zoho Home>/Analytics/lib/ folder.
  6. Start the service.
If the above still does not fix the issue and throws below error, check the log for the mentioned trace.


Log traces:

  1. [14:00:11:936]|[11-26-2019]|[SYSERR]|[INFO]|[91]: 
  2. ERROROCCURED,'3470D4D513AC92FAA6AC922C4BAD16E8',54,'TESTANDFETCHTABLES',500,1574730011000,-1,'COMMON_INTERNAL_SERVER_ERROR',108,'','','','An unexpected error occurred while performing this operation.','https://l-adrien:8443/ZRCloudDBAction.ma','-','172.30.10.216','169.254.26.169_sas','-Not Provided-','ClassNotFoundException:org.gjt.mm.mysql.Driver at URLClassLoader.findClass(LN:381) at ClassLoader.loadClass(LN:424) at ClassLoader.loadClass(LN:357) at Class.forName0(LN:-2) at Class.forName(LN:264) at DirectDBConnection.getDBConnection(LN:34) at DirectDBConnection.<init>(LN:30) at ZRCloudDBAPI.getDBConnection(LN:3007) at ZRCloudDBAPI.getConnection(LN:1313) at ZRCloudDBAPI.getConnection(LN:1254) at ZRCloudDBAPI.getCloudDBTableNamesAsList(LN:1742) at ZRCloudDBAction.getTablesFromCloudDB(LN:291) at ZRCloudDBAction.execute(LN:89)','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36'
Analysis:
The classpath used is not present in the latest mysql_connector.jar. 

Solution:
  1. Stop the Zoho Analytics Onpremise service.
  2. Replace this file (dbtypes.json) under <Zoho Home>/Analytics/conf/ZohoDB/ 
  3. Start the service.
Note: 
  1. This fix can be used for Zoho Analytics Onpremise version 4300 and below.