Deploy JavaFx+Spring Boot+JPA+MySQL application - mysql

I'm new Java developer and I'm developing a stock management desktop application with JavaFx and Spring Boot.
The application is supposed to allow multiuser connection. This meant, the same application will be installed on many client desktops (in a LAN).
All client will use the same MySQL or SQL server database.
I thought about a solution, but don't know how to implement it:
- Installing the application will generate a custom config file which will contain the database and hostname url so that we can modify it with the hostname, username and password... etc.
Please help me.

Related

Connect a Flutter app to a MySQL database that's on a VM

For a school project, we want to create an app using flutter (dart + android studio), and for it we would need a database to which we connect the app.
We have two options :
A MySQL database that's hosted on our school's servers (on a Ubuntu VM, accessible from SSH with a host address, username an password)
Another MySQL database on our school's server, but hosted directly on a server for databases (no VM). For that one, we would have more 'common' logs as the host and port.
Here are the specs of the second one :
Linux Fedora Core 18 //
Apache/2.4.4 PHP/5.4.14 //
MySQL Community Server (GPL) 5.5.31 //
phpMyAdmin 3.5.8.1 (2013-04-24)
My question is, how can I access these sql databases (ideally using the second method) from my flutter app ? I know there's a way to access local MySQL databases from flutter, but as the base will be hosted on an external server, I don't know how to correctly connect and dialogue with it.
Thanks
I faced the same problem. The mysql1 package is not well maintained. Google Dart developers do not provide built-in support of RDBMS.
There is another package to work with mysql, maybe you can take a look. mysql_client
I think that the best solution is to create a restApi on your server to manage your crud operation with the mysql database. There are a lot of tutorials on how to create a node application that lives in your server and interact with your database.
This is also a good solution because you add a layer that manage all the back-end stuff of your application.

Configure Web Deploy Publishing - Unable to establish a connection to the MySQL database using the supplied connection string

I’m am trying to use Microsoft WebMatrix version 3 to create and publish a WordPress site to an IIS 8.0 server.
I have created the WordPress site from the WebMatrix App Gallery and as part of this process MySQL has been installed locally on my PC.
I have configured the IIS server for Web Deploy. I have created a website in IIS, I would like to publish my new wordpress site to. I also created a remote database on another server which has MySQL server installed. As part of the publish process, I would like the local database to get published to this remote database. As of now, it is an empty database with a valid username and password.
From within IIS, when I create the publish settings file I get the following error:
"Unable to establish a connection to the MySQL database using the supplied connection string. Would you like to add the connection string to the XML settings file"
I click save and proceed.
When I use this settings file to validate the connection inside Web Matrix. I get the following error.
"The remote server connection succeeded, but Microsoft WebMatrix cannot access databases."
Related info. I have verified that my remote database is available by connecting to it directly from within Web Matrix. The port 3306 is open. I don't know what else I need. Stumped for several days now :-(
Any suggestion will be greatly appreciated.

Database application and remote MySql

I would like to create a desktop application that should work with data on a mySql server running on a remote machine.
So each user has a copy of the desktop app and edits data on the remote mySql server.
Now my problem is that the mySql server will not allow connections from other hosts.
Question, is this just the wrong way of creating the app. If not how do I give any host access to the MYsql server.
(I know I can open up for a specific IP but that won't work as the app could be running anywhere)
You should front your database on the server with a thin service layer, where you could do some validation / processing on the data, perform authentication, etc. Your client apps would then expose those methods in your service layer as web services, to which your client apps would communicate using either SOAP/XML, REST/JSON, etc. In general, it is a bad idea to expose your database directly if your application is within a LAN, and a terrible one to expose it on the internet.

Can't attach MySQL database with my web application

I am using the vmc tool to upload my web application to cloudfoundry. I have pushed my web aplication and created service to bind with. But I am getting a problem in tunneling it. I want to connect my database stored in backup file in my system with my web application. Here is the image where I entered the commands:
I am having an error about path. I don't know how to resolve this. Please let me know how I should attach my databse with my web application.
What the error is saying is that you need to have MySQL client on your build path. Caldecott (the application which gets executed when you type vmc tunnel) uses your own client for either MySQL, Postgres or Redis. If you do not have MySQL client installed or if you do not have it defined in your PATH environment variable, you will get this error.
This is probably not it but there's a space in your password string in the screenshot provided.
Besides that it seems that this error may be generated if the "build path" used for connecting to the database is incorrect. Manually check if the tunnel to the database works fine with those credentials and/or check to see if VMC can access other databases.

Host MVC Application in AppHarbour

I've hosted MVC application having MySql server instance in AppHarbour as backend but build is getting failed. We would like to connect MySql instance from local application but it can't access tables and schema while is opening and connecting to instance successfully.
You can't connect AppHarbor to a local db. If you have a hosted MySql instance though, you can connect it to that.
AppHarbor shows you build errors. You can read the build output and find out why it is failing (if it is the build failing or unit tests failing).
Either way, whether or not MySql is hosted or local, that shouldn't affect whether or not the project builds in AppHarbor.