?️ 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

  1. Navigate to Databases
    Click on "Databases" in the main menu
  2. Add Database
    Click "Add Database" button
  3. Configure Database
    • Database name: Choose descriptive name
    • Type: Select MS SQL or MySQL
    • Database server: Usually localhost
  4. 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

  1. Go to Databases
  2. Click on database name
  3. Select "Export Dump" or "Backup"
  4. Choose format (SQL, CSV, XML)
  5. Download backup file

Database Import/Restore

  1. Navigate to Databases
  2. Select target database
  3. Click "Import Dump"
  4. Upload SQL file
  5. Click Import
Tip: Always use parameterized queries to prevent SQL injection attacks. Never concatenate user input directly into SQL queries.
?האם התשובה שקיבלתם הייתה מועילה 0 משתמשים שמצאו מאמר זה מועיל (0 הצבעות)