Creating Reference and Platform module using SDK

Hello community I have set up all the pre-requistes needed to creat both platform and reference application modules.I have tryed to create both modules following the procedure ac-cordingly but ending with errors like the one found HERE What could be the problem? This error is for reference application.

@ddmaker any of these could be the problem.

1: database connection properties mismatch 2:Wrong configuration as you build the module.

-Try doing a manual ping to your RDMS and see if it correctly installed. -Try using default values for app and database servers

Are you able to connect to your mysql instance from command line or GUI tool using the user name and password that you are providing to this wizard?

1 Like

Did you modify the database connection string? I noticed this jdbc:mysql://localhost:3306/denis. Seems you replaced @DBNAME@ with denis. You shouldn’t do that. In fact unless you have mysql running on a port other than 3306 then you don’t need to change the default database connections string. The @DBNAME@ will be replaced by the sdk with a database called openmrs.

Update: The sdk actually replaces the connection string and creates a database name that matches the name you chose for your server. So unless you called your server denis then it shouldn’t be there.

It’s also possible that you passed wrong mysql credentials when setting up your server. Like @dkayiwa said. Check to see if you can connect to the database manually via the terminal.

1 Like

Thanks @ivange94 and long live bro.I have tried to use the defaults but still getting errors,also I have been googling for how to connect to my mysql instance from command line but no good news.:slight_smile:

Have been googling and making research about how I can connect to my mysql instance from command line but no good news.Clue for the procedure is will be appreciated,thanks to @tendomart as well.

Can you connect using a GUI like MySQL Query Browser?

What do you mean by no good news? Do you mean you haven’t seen anything that shows you how to connect to mysql or you’ve tried the suggestions but you get errors. If the latter is the case please let us know what exactly you’ve tried and what errors you are getting. Just saying I’ve tried all and no good news does not help us to help you.

1 Like

@ddmaker have you tried all the solutions given the devs on this thread each would e of help sir…

If you have mysql installed on your machine then just a command like this mysql -u your db username -p press enter which will prompt for your password and then you enter your pass word . Should help you to check whether you have access to your mysql instance

Thanks @taremwatadeo for your response and this is what comes after mysql -u your db username -p command, https://www.pastiebin.com/597d387e96de7 am not prompted for the password.

@ddmaker is this of help? https://dev.mysql.com/doc/refman/5.7/en/connecting.html

2 Likes

@ddmaker i think this should help if it doesn’t help please feel free to let us know

Hullo @dkayiwa and @taremwatadeo I still have a problem with this: force a MySQL client to use a named-pipe connection by specifying the --pipe or --protocol=PIPE option, or by specifying . (period) as the host name. If named-pipe connections are not enabled, an error occurs. Use the --socket option to specify the name of the pipe if you do not want to use the default pipe name.

Connections to remote servers always use TCP/IP. This command connects to the server running on remote.example.com using the default port number (3306):

shell> mysql --host=remote.example.com

To specify a port number explicitly, use the --port or -P option:

shell> mysql --host=remote.example.com --port=13306

In the Link is the Options I have tried and the error messages am getting,otherwise the rest of the commands are running well ie from the url I was given. https://www.pastiebin.com/597e6968c1eb0

what are you trying to achieve with this? I thought you wanted to connect with mysql in this case which is on your local machine and the problem is your just coping commands and pasting as they are without replacing the placeholders e.g [quote=“taremwatadeo, post:10, topic:12538”] mysql -u your db username -p [/quote]

Here you should have replaced “your db username” with what you set up as the user name of your mysql when you were installing it.

2 Likes

Thanks family,MYSQL is well connected and am able to say that. Some times am disturbed by the terminologies used here and some other few things that is why even what seems to be easy its dicult to me hence taking long to get to the right point.Otherwise thanks’ very much. Back to the initial question,All conections are ok as asked by @dkayiwa and have followed the defaults as guided by @ivange94 but getting error when creating the module again.This is the error https://www.pastiebin.com/5980239c01fe2 .

No worries man. It’s always like that when you just getting started but with time you’ll get used to. When I go back to the questions I used to ask my first few months in OpenMRS I laugh at myself and wonder how I used to be that naive and I still do ask such questions sometimes :joy:

That link is broken.

1 Like

i can access the link but looks like it is still the mysql problem . comparing this ‘jdbc:mysql://localhost:3306/@DBNAME@’ with this jdbc:mysql://localhost:3306/server4 .seems it cant find that dbname (server4) in your database . @ivange94 this is the error he gets Failed to execute goal org.openmrs.maven.plugins:openmrs-sdk-maven-plug n:3.11.0:setup (default-cli) on project standalone-pom: Failed to setup server: Failed to connect to the specified database jdbc:mysql://localhost:3306/server4 autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode= rue&characterEncoding=UTF-8 -> [Help 1]

so @ddmaker first check to see whether a database named server4 exists , if not create it

I guess it was my connection that was broken. I can access the link now.[quote=“taremwatadeo, post:19, topic:12538, full:true”] so @ddmaker first check to see whether a database named server4 exists , if not create it [/quote]

The sdk creates the database. It’s not necessary to do it manually.

@ddmaker can you please try all the setup with all defaults and record your screen while doing that then share the recording here. That way it will be easier to see where exactly you are going wrong. Note, must not be a video. Preferably a gif so it will save you some time and bandwidth. Just google screen to gif tools for your platform(OS)

1 Like