This document contains information about what a connection string is and what data you need to connect your application to a Plesk database.
A connection string is a text that your application uses to connect to a database. It indicates where the database is located and which credentials to access it with. It is widely used in ASP.NET and ASP applications, and its format changes depending on the database type: it is not the same for MySQL as it is for Microsoft SQL Server.
Access: log in to the client portal, open your service, and click on Log in to Plesk. Then go to Websites & Domains → Databases.
Data contained in the string
- Server: listed under Connection info, below the database name. For applications hosted on your own service, if localhost is listed, use that value.
- Database name: the full name, with your account prefix, exactly as it appears in the list.
- User and password: the user is listed next to the database. If you don't remember the password, change it from User Management.
To find out the exact format according to your language and database type, consult Microsoft's documentation on connection string syntax. For more details on connection data, search for Plesk database access in the knowledge base.
Security: save the connection string in your application's configuration file (for example, web.config in ASP.NET) and not on visible pages or in text files inside httpdocs.
Common issues
- The application does not connect: check that the database name and the username include the prefix, and that the string format matches the database type.
- I changed the password and the site stopped working: update the new password in the connection string.
- I need to connect from outside my service: contact us via ticket for remote access data.
If you need help with your connection string, open a ticket from the client portal or consult via the site's online chat.
