Hi, I am new to OpenMRS community. To understand the OpenMRS development and start participating, i have started going through the devdocs and simultaneously setting up the Environment on mac. While setting up database using OpenMRS wizard(http://localhost:8080:openmrs), i get the MySQL db connectivity issue. In the terminal window i gave mysql command to see if mysql is working but it gave the following error. Please help. suma$ mysql ERROR 1045 (28000): Access denied for user ‘suma’@‘localhost’ (using password: NO)
if you are trying to access the db from terminal, then the above command is wrong. You should do something like
mysql -u username -p
This should ask you for the password, if the password is correct then you will have access to the db
what is the issue?
I tried the above command but still get the same error ERROR 1045 (28000): Access denied for user ‘suma’@‘localhost’ (using password: YES)
Thank you Shekhar. I could connect to mysql db now. I proceeded with the next steps in the wizard, it completed the following tasks so far Tasks completed so far: Created database openmrs Created user openmrs_user Granted user openmrs_user all privileges to database openmrs Created database tables and added core data Added demo data
Now i see this error in the wizard : What to do with this error: Please help. OpenMRS version is : OpenMRS 2.1.0-0128b1 Installation Wizard
There was an error while updating the database to the latest. file: liquibase-update-to-latest.xml. Error: Migration failed for change set liquibase-update-to-latest.xml::20110825-1000-creating-providers-for-persons-from-encounter::raff: Reason: liquibase.exception.DatabaseException: Error executing SQL insert into provider(person_id, identifier, creator, date_created, retired, retired_by, date_retired, retire_reason, uuid) select distinct person.person_id, user.system_id, 1, CURRENT_TIMESTAMP, user.retired, user.retired_by, user.date_retired, user.retire_reason, CONCAT(‘prov’, SUBSTRING(person.uuid, 5)) from person as person inner join encounter as encounter on encounter.provider_id = person.person_id left join (select max(users.user_id) as user_id, users.system_id, users.person_id, users.retired, users.retired_by, users.date_retired, users.retire_reason from users as users group by users.person_id) as user on person.person_id = user.person_id where user.user_id is not null and encounter.provider_id not in (select person_id from provider): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘openmrs.users.system_id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: Caused By: Error executing SQL insert into provider(person_id, identifier, creator, date_created, retired, retired_by, date_retired, retire_reason, uuid) select distinct person.person_id, user.system_id, 1, CURRENT_TIMESTAMP, user.retired, user.retired_by, user.date_retired, user.retire_reason, CONCAT(‘prov’, SUBSTRING(person.uuid, 5)) from person as person inner join encounter as encounter on encounter.provider_id = person.person_id left join (select max(users.user_id) as user_id, users.system_id, users.person_id, users.retired, users.retired_by, users.date_retired, users.retire_reason from users as users group by users.person_id) as user on person.person_id = user.person_id where user.user_id is not null and encounter.provider_id not in (select person_id from provider): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘openmrs.users.system_id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: Caused By: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘openmrs.users.system_id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by Error while trying to update to the latest database version
Could you please help with the next error that i have posted.
This is a known problem caused by changes in the latest mysql versions as you can see at: https://issues.openmrs.org/browse/TRUNK-4813 For now, the work around is to use mysql version 5.6
I have installed mysql version 5.6 and it worked. Thank you.
I’ve been able to successfully build the Legacy UI module, but I’ve not been able to locate the proper directory to copy it to in the build of openmrs-core. I looked at the comments section for solution and started following steps to extract 2.0.x branch to rebuild. i see the following error when i give this command to fetch 2.0.x branch. Does 2.0.x repository still exists or the repository name has changed? Please let me know how to proceed :
git fetch upstream 2.0.x:2.0.x - "suma$ git fetch upstream 2.0.x:2.0.x fatal: ‘upstream’ does not appear to be a git repository fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. "
The tomcat logs show the runtime properties file in use. Something like: Using runtime properties file: … So this file is in a location which has the modules folder.
i re-extracted openmrs-core from repository and did a build again and also built legacyUI module. it was success. I dont see modules/data folder in openmrs-core after the build to copy .omod file of legacyUImodule .omod file. What is the path that i should go into to copy legacyui .omod file on osx. Does modules/data folder will be created while building the openmrs-core or i have to create the folders manual.
Run the platform and check your tomcat logs for the folder as i stated above.
I am running the platform with this command mvn jetty:run instead of deploying the war file in tomcat. I am not using tomcat as of the moment to run platform. Do you want me to use tomcat? Please suggest.
Check the log where you type the mvn jetty:run command.
I checked the runtime log in the terminal. It gave warnings that it could not find runtime.properties file under webapp and instead using the file under .openmrs/openmrs-runtime.properties. Under .openmrs folder, i could see modules folder but dont see data folder. I copied .omod file to the modules folder (.openMRS/modules/legacyui-1.1-SNAPSHOT.omod). Restarted platform server. On the terminal window when i started the server its showing this message now: The same error shows in openmrs-runtime.properties file.
There was no data folder under .openMRS/modules. created data folder and copied the file.
ERROR - ModuleFactory.getModuleFromFile(539) |2016-09-01 14:52:06,580| Error getting module object from file data org.openmrs.module.ModuleException: Module file does not have the correct ‘.omod’ file extension Module: data at org.openmrs.module.ModuleFileParser.(ModuleFileParser.java:88) at org.openmrs.module.ModuleFactory.getModuleFromFile(ModuleFactory.java:535) at org.openmrs.module.ModuleFactory.loadModule(ModuleFactory.java:107) at org.openmrs.module.ModuleFactory.loadModules(ModuleFactory.java:193) at org.openmrs.module.ModuleFactory.loadModules(ModuleFactory.java:173) at org.openmrs.module.ModuleUtil.startup(ModuleUtil.java:76) at org.openmrs.api.context.Context.startup(Context.java:830) at org.openmrs.web.Listener.startOpenmrs(Listener.java:243) at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42)
I deleted the data folder and copied .omod file under modules folder. It worked. I could see login page finally. Thank You all for support.