I have an MSAccess database in my local windows. and I need to connect it with java code using Kubernetes.
I tried to use the below:
jdbc:ucanaccess:///run/desktop/mnt/host/c/Users/Public/fdb/F_B_1_2.mdb;jackcessOpener=com.sms-manager.mobile_app.mobileapp.manage.CryptCodecOpener
But it's not working with me.
it's giving java error database not existing.
Is your java application running in container and trying to connect to ms access db which is in another machine? if yes then you can create Kubernetes service and endpoint of your db server or external name of db server. Choose suitable JDBC and ODBC driver to connect to MS Access Database
Related
I have a java application that is deployed on AWS EC2 instance. This application is connecting to an AWS RDS db. This works fine. But from my local windows when I debug the code in intellij, it is not able to connect to db because it require an ssh key and EC2 instance ip for connection along with password.
Java application uses oracle hibernate connection with entity manager.
I came across this solution
https://www.jetbrains.com/help/idea/connectivity-problems.html#step-4-check-if-the-connection-with-ssh-ssl
but I don't see SSH configuration option on Tool windows in my Intellij.
Could someone help me on how can I make db connection using java application using intellij or by deploying application in tomcat in my local?
I have a Ubuntu VM in an EC2 AWS instance, with MongoDB installed. I can successfully save information to this database on my local machine using a spring boot application. However, this remote connection can only be made when I have a connection to remote Mongodb open on my local machine. Otherwise, the connection is refused.
My end goal is to have a mobile application that can preform CURD operations to a remote MongoDB.
Any help regarding this issue is appreciated.
Thanks.
You shouldn't be trying to connect to a remote MongoDB from a mobile application because anyone will be able to tamper with the information you are storing in it.
Consider using a local database bundled along with your mobile application or connecting from your mobile application to your Spring boot app which can then talk to the MongoDB instance.
Please check some point.
1: Please check remote connection open in your Mongo instance
2: Ec2 Instance have public accessibility
3: Ec2 Instance mongo port enabled and remotely accessible.
Did you confirm that the bind_ip actually changed to 0.0.0.0/0, ::/0
So I created a MySQL DB on amazon running on the same account as my tomcat server, it built and is running correctly but can't connect to the database.
I can access the remote database running the site using tomcat on my computer, and I can access the db through MySQL workbench, but when I deploy and run it I get a 500 whenever the site tries to access the database.
I opened up my security on this database to accept any connection and port(lol), and I checked if the mysql java connector.jar in the WEB-INF/libs file is the latest version. I even tried setting the JDBC connection string to localhost to see if it would pick it up, but no luck.
I think I'm missing something, can anyone think of any reason my website's JDBC can access the remote database server from my machine but not from the amazon tomcat server?
Also, this is a student project I'm building.
Hope this description makes sense, maybe someone can think of something I haven't tried:)
I have made a Netbeans application that is reliant on the DB Network Server in order to retrieve data. In Netbeans the code works fine and runs well. Outside of Netbeans everything but the database information is working. I have made a batch file for connecting to the localhost server that seems to connect on the port I assigned: 1527. Even after connecting to the localhost, it won't display the database information.
My code in the batch file:
PATH C:\Program Files\Java\jdk1.8.0_25\db\bin;%PATH%
startNetworkServer
When I run this I get the result:
Security manager installed using the Basic server security policy.
Apache Derby Network Server - 10.10.1.8 - (1557168) started and ready to accept connections on port 1527connect
Is there more code that I need to add in order to connect to the actual database itself from the server? Or is this not the right way to do this at all? I have tried using the Embedded DB but that didn't work and only caused more problems. I would prefer greatly to stay away from it and stick to the Network DB.
I created an EBS instance including the RDS instance based on MySQL.
I have access to the EC2 instance using SSH via PuTTY and using the MySQL Workbench I've got access to the RDS instance as well and I can create tables and insert data in them.
I developed a Java application using Netbeans 7.3.1 and when I run the application locally while connecting to the MySQL instance on RDS the application shows the same problem although I can connect to MySQL from within Netbeans without a problem, ie I can connect to the database. But as soon as I deploy my simple application onto EBS and run the same application I get the error "Access denied for user ''#'' (using password: YES)"
I added the IP to the Security Group of my RDS instance as well as the EBS instance. Just to be sure.
Still I got the Access Denied error. The JDBC_CONNECTION_STRING environment variable I've set up is "jdbc:mysql://.cdydcnmtkkhw.us-west-1.rds.amazonaws.com:3306/ebdb?user=&password="
When I use any of the tools to connect to this database with that information all works, when I try to connect from my Java application running in Tomcat, I get the Access Denied message.
The Java call I'm using is:
private java.sql.Connection connect = DriverManager.getConnection(jdbcConnect);
This looks more like the stock standard cannot connect to mysql error and nothing really to do with EC2 as you have set up you security group.
See the mysql link. which explains about
SET PASSWORD FOR 'abe'#'host_name' = PASSWORD('eagle');