How to solve MySQLDAC HTTP Tunnel connection - mysql

I want to connect to MySQL database using HTTP Tunnel (because port for remoting database is closed). I used mysqlDAC vcl for Delphi, when I was in design mode, i used GridView to display its data successfully.
But the problem when i compile the project, I always get this error :
Project WP.exe raised exception class HttpException with message 'Error on data reading from the connection:
A blocking operation was interrupted by a call to WSACancelBlockingCall.
Socket Error Code: 10004($2714)'. Process stopped. Use Step or Run to continue.
Can somebody help me to solve this problem? I think my connection setup is correct, because I can display the data on DBGrid when I set connection is true.

Related

Getting error on live environment while connecting with Oracle Cloud Autonomous Transaction Processing Using wallet

The application is developed on VS 2015 Express. The same connection string is connected to my local system but on live environment, it is giving me error. Please help me out.
Error Message: ProviderIncompatibleException
Exception Type: System.Data.Entity.Core.ProviderIncompatibleException
Error Location : An error occurred accessing the database. This usually means that the connection to the database failed. Check that the connection string is correct and that the appropriate DbContext constructor is being used to specify it or find it in the application's config file. See http://go.microsoft.com/fwlink/?LinkId=386386 for information on DbContext and connections. See the inner exception for details of the failure.
Error Page Url: http://10.0.17.3:8081/
Usually, there's a different Oracle TNS_ADMIN location and wallet location for the live environment vs. the dev environment. You can set the wallet location in the .NET code or in sqlnet.ora. The TNS_ADMIN can be set in the code or as a Windows environment variable.
This error is fairly generic. If you can identify an inner exception or provider specific error code, it would be easier to identify the root cause of the problem.

SSIS Connection Manager - retry connection after failed attempt

I am wondering if there is a property from the connection manager or a straight forward way to retry the connection in case of timeout.
I am experiencing a random connection error when trying to connect to a webservice. I've checked that if I program a set of consecutive jobs to execute the package the connection works the 90% of the times, and I have not found a pattern neither the error message helps.
Thanks in advance!

connect asp.net to mysql on linux error of connection

i can't hosting to connect to mysql database on linux i have this error message :
Unable to connect to any of the specified MySQL hosts
i need your help thx; this is my code
I suspect this message came from an exception thrown by your con.Open() call. The message means your attempt to Open() the connection failed because Connector/Net (the .net driver for mySQL) couldn't find the server you asked for. (Never mind the pluralization in "any of the specified MySQL hosts" ; that is for a loadbalancing / failover feature you're probably not using.)
If it took a few seconds for con.Open() to throw the exception, that means there was a timeout. That means the host at x.x.x.x did not respond at all, probably because it's not there or behind a firewall. If you're trying to connect from your home or office to a MySQL server at a hosting service, you may need to go into the hosting service's control panel and whitelist your own machine's IP address.
If Open() threw its exception quickly, it means the host is there, but it is not running a MySQL server.
Pro tip: Always wrap your Open() calls in their own try{}catch(){} clauses; failed database connection attempts are not an unexpected occurrence. Here is an explanation.

Authentication mysql to .Net

I have Mysql DB connected to .NET MVC. When i connect remote it some times works fine and some times i have this error msg:
MySql.Data.MySqlClient.MySqlException (0x80004005): Authentication to
host 'ServerName' for user 'UserName' using method
'mysql_native_password' failed with message: Reading from the stream
has failed. ---> MySql.Data.MySqlClient.MySqlException (0x80004005):
Reading from the stream has failed. ---> System.IO.IOException: Unable
to read data from the transport connection: An established connection
was aborted by the software in your host machine. --->
System.Net.Sockets.SocketException: An established connection was
aborted by the
Please how can i make Authentication ? Any ideas to solve it?
This is a common error when some kind of deadlock occurs on the database more commonly a connection has been open a long time and gets shut down at the database end even though it is still in-use in your web application.
In my code, I used a suggestion from Microsoft, that retries the database command if it fails. The link is here: http://social.technet.microsoft.com/wiki/contents/articles/4235.retry-logic-for-transient-failures-in-windows-azure-sql-database.aspx Similar things exist for other non-Azure problems that use RetryPolicy.
What this means in a simple (Azure in my case) example is:
private static RetryPolicy<SqlAzureTransientErrorDetectionStrategy> retryPolicy = new RetryPolicy<SqlAzureTransientErrorDetectionStrategy>(new Incremental(3, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1)));
// Inside your database function
retryPolicy.ExecuteAction(() =>
{
db.ExecuteStoredProc("procRecordMetric", cmd);
});
In my case, this was caused by ssl being enabled on the mysql server.
Here is a snippet from my.cnf
#ssl-ca = /etc/ssl/mysql/ca-cert.pem
#ssl-cert = /etc/ssl/mysql/server-cert.pem
#ssl-key = /etc/ssl/mysql/server-key.pem
Commenting these 3 lines fixed the issue for me.

Connection pool detection

I am creating an application in java using glassfish server in netbeans. I've created connection pool and data source for sql query execution. I have created a sample jsp page to check the transection using connection pool which is as follows.
And as I run this file in browser I get this internal error.
"javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: null""
Got the solution!! :)
The problem was. I didn't set password for mysql. At the time setting up a new connection pool, providing password is mendatory. so I just added the password and now it is working. I hope if anybody else faces the problem then it would be helpful