As information, I did not use the user dba again because I thought my problem was using root and I created another user (dba). Then I saw this was not the problem and I used root to set up the server.
What I have been learning and missed up with during setting up the server:
Root must have a password and it should respect some conditions like having a minimum of 8 characters and so on.
The server id is the server name we give while setting up the server but not the server_id we set in the my.ini file while setting up Mysql.
Yes I did @sharif, thank you for checking ! Now I am working on a module to read the OBS for the current month as a way to learn how to deal with the data model. If you have any documentation or article about CRUD (Create, Read, Update and Delete) data for OpenMRS please share.
I have already consulted the devmanual and I think I still need more documentation.
Hi
Thanks for the similar question @reaganâŠ
I am trying to set the server but I am not able to create one. I have installed MySQL 5.7 and have the MySQL Workbench working. I have set the password for the root user while installing MySQL and also created a user âkavinrajuâ with a password. But when I try to create a server I am getting the following error.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 47.158 s
[INFO] Finished at: 2020-03-21T20:11:02+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.4:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to connect to the specified database jdbc:mysql://localhost:3306/server1?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8 â [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:3.13.4:setup (default-cli) on project standalone-pom: Failed to setup server
Caused by: java.lang.IllegalStateException: Failed to connect to the specified database jdbc:mysql://localhost:3306/server1?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8
New user was the one created when I installed MySQL. Yeah it has all the privileges checked. Itâs showing the same error for both root & new user I created.
@dkayiwa I am also facing the same issue here, supplying the default database URI also does not work. The Docker option works as intended. Any idea why this happens?
I can see you are trying to connect to server1 database. Have u already created that before the setup ?
It should be created prior setting up openmrs so the installation will be connecting to that database.
I am trying to connect to âopenmrsâ database, which is already created in mysql, but I get the same error. Tried both in Distribution and Platform setup modes.
I had the same problem.
Iâve installed fresh mysql at Ubuntu but I left mysql password empty, and as a result I couldnât connect to mysql in any way.
Lately Iâve revealed that there is a table of users where are names, hosts, passwords and some plugins. So for my user root@localhost mysql while installing assigned a plugin called auth_socket , which let Unix user ârootâ log in as a mysql user ârootâ without password, but donât allow login as another Unix user. So to fix that you should turn off this plugin and set usual authentication:
open Linux terminal
enter " sudo mysql "
you will see âmysql >â which means youâve connected to mysql as a ârootâ Unix user and you can type SQL queries.
enter SQL query to change a way how you will log in:
ALTER USER ârootâ@âlocalhostâ IDENTIFIED WITH mysql_native_password BY âyour_new_passwordâ;
where âmysql_native_passwordâ means - to turn off auth_socket plugin.