Skip to content

Knowledgebase

Connecting a Windows-hosted application to MySQL or an available SQL Server database

web-hosting, development

A database connection has four independent parts: a supported database engine, its server address, an authorised database user and an application driver. Check all four before changing passwords or importing the same database repeatedly.

01 Choose the database your application supports

Our Windows hosting page lists MySQL. SQL Server should only be selected when it is explicitly available on your service or separately arranged. A SQL Server backup cannot be imported as a MySQL dump, and the connection-string formats are not interchangeable.

  1. Review the application's documentation for the required database engine, version, driver and character set. For an existing application, inspect its current configuration without exposing the password.
  2. Open the correct subscription in Plesk and go to Databases. Create a database using an engine offered by that subscription. If the required engine is absent, confirm availability with support before buying or migrating.
  3. Create a database user for this application and grant only its required access. Use separate users for unrelated applications. Do not reuse the Plesk account password.
  4. Import the database through the matching tool. For large files, confirm the supported upload or restore method with support. Check the import result and expected tables before continuing.
  5. Copy the actual database host, port where needed, database name and username into the application's production configuration. Do not assume the server is localhost. Use encrypted database connections when the service and application support them.
  6. Test a simple application login, a read and a reversible write. Remove temporary connection-test pages when finished, especially pages that show configuration details.

Why can my Windows application not connect to its database?

Access denied usually points to credentials, permissions or an allowed-host restriction. Connection timeout suggests the destination, port, network rule or service availability. Unknown database points to the name or selected server. A missing driver is an application runtime problem, not a reason to recreate the database.

02 Protect production data

Export or back up the destination before replacing tables. A successful import does not merge new orders with an older copy. If the application has already accepted live transactions, agree a reconciliation plan before restoring. Give support the engine, timestamp and sanitised error, while keeping passwords and customer records private.

Sources and further reading

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support

Powered by WHMCompleteSolution