Overview
Microsoft SQL Server (MSSQL) databases are available on your Windows hosting account. This guide covers creating, managing, and connecting to databases through Plesk.
Creating a Database
- Log in to Plesk
- Go to Websites & Domains
- Click Databases
- Click Add Database
- Enter a Database name
- Select Microsoft SQL Server as the type
- Under "Create a database user", enter:
- Database user name
- Password (use a strong password)
- Click OK
Managing Database Users
Add User to Existing Database:
- Go to Databases
- Click User Accounts
- Click Add Database User
- Select the database and enter credentials
- Click OK
Change User Password:
- Go to Databases → User Accounts
- Click on the username
- Enter new password
- Click OK
Connection String
Use this format to connect from your application:
Server=localhost;Database=YOUR_DATABASE_NAME;User Id=YOUR_USERNAME;Password=YOUR_PASSWORD;TrustServerCertificate=True;
Example in appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=mydb;User Id=myuser;Password=mypassword;TrustServerCertificate=True;"
}
}
Accessing phpMyAdmin-like Tool
Plesk does not include SQL Server Management Studio, but you can:
- Go to Databases
- Click on your database name
- Use Import to run SQL files
- Use Export to backup
Importing Data
Import SQL File:
- Go to Databases
- Click on your database
- Click Import
- Upload your
.sqlfile - Click OK
Import from Backup:
Contact support for restoring from .bak files as this requires server-level access.
Exporting/Backing Up
Export Database:
- Go to Databases
- Click on your database
- Click Export
- Download the SQL dump file
Tip: Regularly export your database for backup purposes.
Database Size Limits
- Check your hosting plan for database size limits
- Monitor database size in Plesk → Databases
- Contact support if you need increased limits
Troubleshooting Connections
"Login failed for user"
- Verify username is correct
- Check password (case-sensitive)
- Ensure user is assigned to the database
"Cannot open database"
- Verify database name is spelled correctly
- Check database exists in Plesk
"A network-related or instance-specific error"
- Use
localhostor.as server name - Do not use your domain name for database server
SSL/Certificate Errors
- Add
TrustServerCertificate=True;to connection string
Best Practices
- Regular backups: Export your database weekly at minimum
- Strong passwords: Use complex passwords for database users
- Separate users: Create different users for different applications
- Minimal permissions: Only grant necessary permissions