could not access azure mysql - mysql

I have a MySQL server database running on Azure. It has already running to store data from my ASPX web apps hosted on Azure also. I have plan to migrate the apps to Java JSF or .net core.
I developed using Tomcat server (in my local pc) and try to connect directly to mySql in Azure. But I always get Communications link failure error.
Is it not allow to connect directly from my local Tomcat server to database in Azure, or something else?
Thank you in advance for the answer.

Yes you can connect from your local tomcat to your azure mysql if you have provided the correct connection string.
Also add your ip in the firewall rules of the sql resource.

Related

Database Connection Problem - Azure MySql Database Server from .net core 3.1

-- Background:
I am using asp.net mvc project with 3.1 .net core.
I have azure setup for hosting it in app service.
For Database, I have mysql database server set up on Azure (version 5.7).
-- Problem:
I am using basic connection string when connecting to mysql database. But it is not working for hosted application.
When I connect the azure hosted database server locally using WorkBench, and run the program (locally), it 'works'. (WorkBench connection has Ssl = required and SSL cert File attached.)
But when I publish the same code with same connectionString, it is not working.
IS IT BCZ OF:
I am using 5.7 azure mysql database server?
(To update the version, do I need to create new mysql server on azure and pay $20? Because Mycrosoft documentation says there is 'Upgrade' option on overview. But there is not. Or might for higher subscription. Any suggestions?)
If the reason is I am missing mentioning ssl certi on hosted platform, how can I add it? Do I need to get storage to store that certificate? How can I mention that path in connectionString?
Any other reason for this problem?
I checked YouTube, Microsoft documents, And Google but didn't find solution.
UPDATE:
Libraries used:
MySql.EntityFrameworkCore 3.1.X
Microsoft.EntityFrameworkCore 3.1.X
MySql-Connector-Net 8.0.X
Connection String used: "Server=.mysql.database.azure.com;Port=3306;Database=;Uid=;Pwd=;"
Solution:
It was unable to connect because of incomplete networking.
I had to allow other azure services to connect that server.
Thanks for your comments.

MySQL connection in Logic app required an on premise gateway by default - why?

I have an azure hosted MySQL data base and am now trying to use the MySQL connector in a logic app. Unfortunately the connector requires an on premise gateway as one of the mandatory requirements. I have read that I should disable SSL which is already the case. Any idea how I can make a connection to this DB?
MySql connector in logic app at this point allows you to connect to the on premises mysql database through an on premises datagateway. You cannot directly connect to the mysql database hosted on azure. The workaround for this is that you write an azure function which connects with the mysql databases and call the azure function in your logic app. The azure function can be a http triggered

How to upload java server to remote server?

Hello I've created an android application, with server-side code.
So I have my android app (Client) Server-side code(Server) and database (mysql workbench).
I created my server side in Java J2EE and its running on localhost.
Everything works just fine.
I need help in how to upload my server and database to remote server so everyone can access from everywhere. - Not just from my local lan.
thank for the help
you have to buy a space in public server(or public ip) install tomcat and mysql there,deploy your application(.war file) in tomcat and import you db in mysql you have installed.
Some servers already have tomcat and mysql running. Google it for the vendors.
Try buying a shared server in the starting.
You can go for amazon s3 or can have cPanel from any linux server available in market.

connecting azure website to sql server database on external server

I had hosted my site on Azure and my database to azure sql databse but the problem with azure sql database does not support data encryption and for that reason I have to move my sql database to external server.
Now I do not know how I can connect that sql database to azure site?
I found one solution to use service bus but they used WCF console application as a service bus listener which I do not know how to create and host WCF.
I appreciate code sample if anything I need to do in my code or application other than connection string setup.

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.