All pages
Powered by GitBook
1 of 4

Loading...

Loading...

Loading...

Loading...

MariaDB Platform Quickstart Guides

Quickstart Guides

Cover

MariaDB Overview Guide

This Quickstart Guide overviews the MariaDB Enterprise Platform's components. It details MariaDB Enterprise Server (core database), MaxScale (proxy for load balancing, security, testing), and extensions like Galera (replication) and ColumnStore (analytics). It also covers enterprise tools and cloud-native components, illustrating their integrated function for streamlined, robust database solutions.

Cover

Best Practices Guide

This Quickstart Guide outlines MariaDB best practices for robust deployments. Key areas include regular, tested backups and structured change management. It emphasizes dedicated production servers, thorough pre-production testing, and timely updates. Also highlighted are understanding business requirements and leveraging commercial support for optimal performance and security.

Cover

Security Guide

This Quickstart Guide details essential MariaDB security measures. It covers using mariadb-secure-installation for initial setup, enforcing least privilege for user accounts, and securing network access with firewalls and binding addresses. Key practices include data encryption (SSL/TLS, TDE), hardening configurations (disabling LOCAL INFILE, enabling logging), and regular updates and auditing.

Best Practices

This Quickstart Guide outlines MariaDB best practices for robust deployments. Key areas include regular, tested backups and structured change management. It emphasizes dedicated production servers, thorough pre-production testing, and timely updates. Also highlighted are understanding business requirements and leveraging commercial support for optimal performance and security.

Quickstart Guide: MariaDB Best Practices

Adhering to best practices is crucial for ensuring the performance, stability, and security of your MariaDB deployments. This guide summarizes key recommendations.

1. General Recommendations

  • Understand Business Requirements: Before deploying MariaDB, thoroughly understand your business needs and how the database will integrate with existing systems.

2. Backups

  • Perform Regular Backups: Always back up existing data and configurations before any production changes or upgrades/downgrades.

  • Establish and Test Restoration Plans: Have a clear plan for data restoration and regularly test your backups to ensure they are complete and viable.

3. Change Management

  • Implement Formal Change Management: All server configuration changes should follow a documented change management process.

  • Maintain Accurate Records: Keep precise records of when and why changes were made to facilitate faster issue diagnosis.

  • Automate Deployments: Utilize automation and orchestration for repeatable and consistent server deployments and testing, including system provisioning.

4. Production Controls

  • Dedicated Servers: Avoid running other workloads on database servers to prevent resource contention.

  • Understand Isolation and Control Requirements: Before deployment, clearly define workload, data isolation, and audit control requirements.

5. Testing

  • Pre-Production Validation: Validate servers thoroughly before exposing them to production workloads and data.

  • Prevent Unconfigured Access: Restrict access to servers until they are fully configured and validated.

  • Assess Key Details: During validation, assess server capacity, security configuration and hardening, tuning for initial data loads versus production workloads, and alignment with business requirements.

6. Updates

  • Stay Informed: Keep aware of new MariaDB releases, including critical security fixes, by subscribing to MariaDB Product Notifications.

  • Follow Enterprise Lifecycle: If using MariaDB Enterprise Server, adhere to its enterprise lifecycle for updates and upgrades.

7. Obtaining Support

  • Utilize Commercial Support: For comprehensive technical support and services, consider engaging with MariaDB Corporation's commercial support. Existing customers can access assistance via the MariaDB Customer Portal.

This guide provides a high-level overview. For more in-depth information, refer to the official MariaDB documentation on best practices.

MariaDB Overview

This Quickstart Guide overviews the MariaDB Enterprise Platform's components. It details MariaDB Enterprise Server (core database), MaxScale (proxy for load balancing, security, testing), and extensions like Galera (replication) and ColumnStore (analytics). It also covers enterprise tools and cloud-native components, illustrating their integrated function for streamlined, robust database solutions.

Quickstart Guide: MariaDB Products and Their Interoperation

The MariaDB Enterprise Platform is designed to provide a comprehensive database solution, integrating various components to deliver enterprise-grade capabilities.

Key Components:

  • MariaDB Enterprise Server: This is the foundational database engine that provides core data storage and management functionality, designed with an emphasis on security, performance, and reliability for business-critical operations.

  • MariaDB MaxScale: This advanced database proxy acts as an intermediary between client applications and MariaDB servers. It offers capabilities such as:

    • Load Balancing: Distributes database connections across multiple servers to optimize resource utilization and improve responsiveness.

How They Work Together:

The MariaDB Enterprise Platform integrates these components to offer a unified and cohesive database environment. This integrated approach simplifies deployment, management, and support, providing a consistent set of technologies for various use cases, from transactional processing to analytical workloads and cloud deployments. The core server provides data persistence, while MaxScale enhances scalability and security, and specialized extensions address specific performance or availability needs. The accompanying tools and cloud-native components streamline operations and facilitate modern infrastructure integration.

For further details, you can refer to the MariaDB blog post on the Enterprise Platform release:

Security

This Quickstart Guide details essential MariaDB security measures. It covers using mariadb-secure-installation for initial setup, enforcing least privilege for user accounts, and securing network access with firewalls and binding addresses. Key practices include data encryption (SSL/TLS, TDE), hardening configurations (disabling LOCAL INFILE, enabling logging), and regular updates and auditing.

Quickstart Guide: MariaDB Security

Securing your MariaDB installation is crucial to protect your data. This quickstart guide outlines essential steps and best practices to enhance your MariaDB server's security.

Security Features: Provides enhanced security through features like firewalling and query filtering.

  • Routing: Directs database queries to appropriate servers based on predefined rules.

  • Workload Capture and Replay (WCAR): Facilitates the recording of production database interactions and their accurate replay in testing environments for analysis and troubleshooting.

  • Diff Router: Allows for behavior comparison between different server versions, aiding in testing and validation of upgrades or changes.

  • Optional Extensions: The platform supports specialized extensions to address specific database requirements:

    • Galera: Enables multi-master synchronous replication, ensuring high availability and fault tolerance across multiple database nodes.

    • ColumnStore: A columnar storage engine optimized for analytical workloads, providing efficient processing of large datasets for business intelligence and reporting.

  • Enterprise Tools: A collection of tools designed to simplify the management, monitoring, and maintenance of MariaDB deployments, helping to ensure operational efficiency.

  • Cloud-Native Components: For modern deployment strategies, the platform includes:

    • Docker Images: Pre-packaged images for containerized deployments, enabling consistent and portable environments.

    • Kubernetes Operator: An automated component that acts as a database administrator within Kubernetes environments, handling tasks such as backups, security configurations, and point-in-time recovery.

  • Announcing New Release of MariaDB Enterprise Platform
    1. Initial Installation Security (mariadb-secure-installation)

    Immediately after installing MariaDB, run the mariadb-secure-installation script (or mysql_secure_installation on older systems or symlinked versions). This script guides you through critical initial security configurations:

    • Set a Strong Root Password: This is the most important step to prevent unauthorized administrative access.

    • Remove Anonymous Users: Anonymous user accounts are created by default for testing and should be removed from production environments.

    • Disallow Remote Root Login: Prevent the root user from connecting to the database from outside the local machine. This mitigates brute-force attacks.

    • Remove Test Database: The test database and its associated privileges are created by default for testing. Remove them to eliminate a potential security risk.

    • Reload Privilege Tables: Ensure all changes take effect immediately.

    Example Command:

    Follow the prompts to configure your security settings.

    2. User Account Management and Privileges

    • Principle of Least Privilege: Grant users only the minimum necessary privileges required for their tasks. Avoid giving ALL PRIVILEGES unless absolutely necessary for specific administrative accounts.

    • Create Dedicated Users: Do not use the root account for regular application operations. Create specific users for your applications with limited privileges.

    • Strong Passwords: Enforce strong, unique passwords for all database user accounts.

    • Limit Host Access: Restrict user accounts to connect only from specific IP addresses or hostnames where they are expected to connect (e.g., user@'localhost' or user@'192.168.1.100').

    3. Network Security

    • Firewall Configuration: Configure your operating system's firewall (e.g., ufw on Linux, Windows Firewall) to allow connections to MariaDB only from trusted IP addresses or subnets.

    • Change Default Port (Optional but Recommended): MariaDB typically listens on port 3306. Changing this default port can add a layer of obscurity, deterring automated scanning attempts.

      • Edit your MariaDB configuration file (e.g., /etc/mysql/mariadb.conf.d/50-server.cnf or my.cnf on Linux, my.ini on Windows).

      • Change the port directive to a different value.

      • Restart the MariaDB service.

    • Bind Address: Configure MariaDB to listen only on specific network interfaces (e.g., bind-address = 127.0.0.1 for local connections only, or a specific private IP address for network-restricted access).

    4. Data Encryption

    • Encryption in Transit (SSL/TLS): Encrypt communication between clients and the MariaDB server using SSL/TLS. This protects data from eavesdropping as it travels across the network.

    • Encryption at Rest (TDE): For highly sensitive data, consider using MariaDB's Transparent Data Encryption (TDE) to encrypt data stored on disk.

    5. Configuration Hardening

    • Disable LOCAL INFILE: This feature can be a security risk as it allows clients to read files from the server's filesystem. Disable it in your MariaDB configuration:

    • Enable Logging: Configure MariaDB to log errors and general queries. This helps in auditing activities and troubleshooting security incidents.

    • Run as Non-Root User: MariaDB should never run as the root user in production environments. It should run under a dedicated, unprivileged system user (e.g., mysql or mariadb).

    6. Regular Maintenance and Auditing

    • Keep Software Updated: Regularly update MariaDB Server and your operating system to the latest stable versions to benefit from security fixes.

    • Audit Database Activity: Implement auditing to track database operations, especially for sensitive data or administrative actions. MariaDB provides an Audit Plugin for this purpose.

    • Regular Security Audits: Periodically review your MariaDB server's security configuration and user privileges.

    Resources:

    • Top 9 Tips to Achieve MySQL and MariaDB Security - SnapShooter Tutorials

    • How to Secure MySQL and MariaDB Databases in a Linux VPS | DigitalOcean

    local-infile=0
    log_error = /var/log/mysql/error.log
    general_log = 1
    general_log_file = /var/log/mysql/mysql.log
    sudo mariadb-secure-installation
    MariaDB mariadb-secure-installation documentation