?️ Database Management
Supported Database Types
- MS SQL Server: Versions 2016, 2019, 2022 - Perfect for ASP.NET applications
- MySQL/MariaDB: MySQL 5.7, 8.0 and MariaDB 10.x - PHP applications
Creating a Database
- Navigate to Databases
Click on "Databases" in the main menu - Add Database
Click "Add Database" button - Configure Database
- Database name: Choose descriptive name
- Type: Select MS SQL or MySQL
- Database server: Usually localhost
- Create Database User
- Username: Create new or select existing
- Password: Set strong password
- Access control: Set from specific IPs if needed
MS SQL Connection String (ASP.NET)
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=localhost;Initial Catalog=database_name;
User ID=username;Password=password;Integrated Security=False;"
providerName="System.Data.SqlClient" />
</connectionStrings>
MySQL Connection String (PHP)
<?php
$servername = "localhost";
$username = "your_username";
$password = "your_password";
$database = "your_database";
// Create connection
$conn = new mysqli($servername, $username, $password, $database);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
?>
Database Management Tools
- phpMyAdmin: Web-based MySQL management - Access via Plesk → Databases → phpMyAdmin
- SQL Server Management Studio: Connect remotely to MS SQL databases
- MySQL Workbench: Desktop application for MySQL management
Database Backup
- Go to Databases
- Click on database name
- Select "Export Dump" or "Backup"
- Choose format (SQL, CSV, XML)
- Download backup file
Database Import/Restore
- Navigate to Databases
- Select target database
- Click "Import Dump"
- Upload SQL file
- Click Import
Tip: Always use parameterized queries to prevent SQL injection attacks. Never concatenate user input directly into SQL queries.