Hello all–
After playing around with the chart search module on the opemrs demo server and being impressed, I attempted to install it on my local instance of the PIH system and ran into an issue because (I believe) my local instance uses a non-standard database name (ie, openmrs_haiti instead of openmrs).
The module is not working for me, and I see the following in the logs:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user ‘openmrs_hai_user’@‘localhost’ for table ‘obs’
I confirmed that the module is loading my DB connection properties properly from my runtime properties (including the url referencing the DB “openmrs_haiti”), but elsewhere in the error message I see queries that are referencing the DB name directly using “openmrs”:
Caused by: org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT o.uuid as id, obs_id, person_id, obs_datetime, obs_group_id, cn1.name as concept_name, cn2.name as coded, value_boolean, value_datetime, value_numeric, value_text, cc.concept_class_name, cn3.name AS concept_synonym FROM openmrs.obs o INNER JOIN (SELECT * FROM openmrs.concept_name c WHERE c.locale = ‘en’ AND concept_name_type = ‘FULLY_SPECIFIED’) AS cn1 ON cn1.concept_id = o.concept_id LEFT JOIN (SELECT * FROM openmrs.concept_name c WHERE c.locale = ‘en’ AND concept_name_type = ‘FULLY_SPECIFIED’) AS cn2 ON cn2.concept_id = o.value_coded LEFT JOIN (SELECT * FROM openmrs.concept_name c WHERE c.locale = ‘en’ AND concept_name_type IS NULL) AS cn3 ON cn3.concept_id = o.concept_id LEFT JOIN (SELECT DISTINCT o.concept_id, class.name AS concept_class_name FROM concept_class class JOIN concept c ON c.class_id = class.concept_class_id JOIN obs o ON o.concept_id = c.concept_id) AS cc ON cc.concept_id = o.concept_id WHERE person_id=‘8’ AND o.voided=0 AND cn1.voided=0 Processing Document # 1
I’m assuming this is why I’m getting the access issues.
Thoughts? Thanks!