Ostico / docker_matecat

Docker configuration for MateCat web cattool https://github.com/matecat/MateCat
20 stars 22 forks source link

Project status_analysis NOT_READY_FOR_ANALYSIS when using external mysql DB #15

Open hamihaa opened 3 years ago

hamihaa commented 3 years ago

I am trying to use a mysql DB that is hosted on external server, not a docker container with default config. I've populated the matecat db, created a new user on there and modified the config.ini values (DB_SERVER, DB_DATABASE, DB_USER, DB_PASS) with new values, that are not admin:admn. before building the containers.

Problem is, when trying to upload a project, its stuck on analyzing, response is "Not Authorized", but the project is stored in the database projects table, status on each project is NOT_READY_FOR_ANALYSIS.

If i use the default docker-compose mysql image instead, whole project analysis flow works with no problems.

Am i missing a specific additional user role that needs to be created in mysql? NOTE: my current user does not have all permissions granted, since AWS does not allow it, so im using these instead: GRANT SELECT, INSERT, UPDATE,DELETE, EXECUTE, SHOW VIEW ON matecat.* TO 'adminuser''%';

Thank you for your help!

Ostico commented 3 years ago

Hi @hamihaa ,

i think that it is not a matter of permissions. I think it depends on mysql configurations. The Mysql in the docker container do not use default configs.

In particular SQL_MODES

hamihaa commented 3 years ago

hi @Ostico thank you for quick reply!

SQL_MODE might be an issue, my AWS sql_mode is by default set to NO_ENGINE_SUBSTITUTION, but i cant seem to update it to any other value in aws dashboard. What is the suggested value otherwise?

I previously also tried a different local mysql docker image (official mysql:5.7) without copying the matecat specific my.cnf. Problem i had was with FULL_GROUP_BY, so i set sql_mode to "" and it worked...

Ostico commented 3 years ago

https://github.com/Ostico/docker_matecat/blob/800edca38f57eccea0973f3d52082b38e9a7f7b1/MateCat-Bionic/MySQL/my.cnf#L111