I'm tryting to connect Alfresco Community 5.2.e to existing MySQL instance (the instance already has tables and data). However, Alfresco fails to start with following error:
More than one Alfresco schema was found when querying the database metadata.
Limit the database user's permissions or set the 'hibernate.default_schema' property in 'custom-hibernate-dialect.properties'.
The mysql instance really contains multiple DBs, each of them used by other applications. However, name of the database Alfresco is supposed to connect to is given in alfresco-global.properties.
What I've tried so far:
add hibernate.default_schema to tomcat/shared/classes/alfresco-global.properties
add hibernate.default_schema to tomcat/shared/classes/custom-hibernate-dialect.properties
add hibernate.default_schema to tomcat/webapps/alfresco/WEB-INF/classes/custom-hibernate-dialect.properties
connect to empty DB
Attempts 1. to 3. resulted in same error. Attempt 4. worked fine, but I need to connect to existing DB with data.
My questions are:
has anyone any idea how to fix this?
why does Alfresco thinks there are multiple schemas, when being explicitly told to use one particular database in db.name and db.url properties?
Not sure if it helps, but Alfresco currently runs in read-only mode (server.allowWrite=false)
As for the schema details, the database is MySQL 5.6.20, it contains multiple schemas. User configured in alfresco-global.properties has access to two of them, one of them is <db_name> and it's the one I'm trying to connect to. The <db_name> already contains tables following tables filled with data: