Resolved How to connect with my SQL-Database from Website Control Pannel?

Paraman

Member
Joined
Oct 19, 2024
Messages
9
Programming Experience
10+
Hi
I am using Windows applications. For local network, my application works fine. But my company they designed a static website and hence they request me to keep their database with website.
Once I login to my website - DirectAdmin, from Databases, I create my SQL Database.

By I don't know how to connect with my Database. I need to learn this type of connectivity & connection strings.
Any kind helps will be more helpful. I already asked the similar question, but still my requirement not cleared.

For Windows Applications, I try to use the following connection string, kindly advise me to succeed!

Connection String:
My Connection String

String MyDBConString = "Server=100.101.102.99,1234; Database=mywebname_mydbname; User Id=mywebname_user1; Password=mypassword; Persist Security Info=false; Pooling=False;";

The SQLException

A connection was successfully established with the server, but then an error occurred during the pre-login handshake.

(provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)
 
Solution
Most web hosting sites will offer MySQL as the database. You seem to be using the Microsoft SQL database connection class instead of the MySQL connection class.

As for the connection string itself, there is great resource at connectionstrings.com for a quick reference to see what connection strings for different databases look like. That does not absolve you from having to learn the details of the features offered by the connection strings for a particular database.
Most web hosting sites will offer MySQL as the database. You seem to be using the Microsoft SQL database connection class instead of the MySQL connection class.

As for the connection string itself, there is great resource at connectionstrings.com for a quick reference to see what connection strings for different databases look like. That does not absolve you from having to learn the details of the features offered by the connection strings for a particular database.
 
Solution
Back
Top Bottom