The cart is empty

Managing databases is a crucial part of operating content management systems (CMS) on Shared hosting. MariaDB 10.11 is a modern and powerful database platform that can be effectively run in containers. This article focuses on the specific aspects and benefits of running MariaDB 10.11 in containers for CMS on shared hosting.

Advantages of Containerizing MariaDB 10.11

  1. Environment Isolation: Containers allow for the separation of the database environment from other applications on the server, enhancing security and stability. Isolation also prevents conflicts between different software versions.

  2. Scalability and Flexibility: Containerization allows easy scaling of the database according to current load. Containers can be quickly added or removed as needed.

  3. Simplified Management and Deployment: Containers simplify database deployment using predefined image files, reducing the complexity of installation and configuration.

  4. Consistent Environment: Using containers ensures a consistent environment across different servers and development stages, minimizing errors caused by configuration differences.

Steps to Deploy MariaDB 10.11 in a Container

  1. Choosing a Container Platform: Various platforms can be used to run containers, such as Docker or Podman. This article focuses on Docker as the most widespread solution.

  2. Preparing the Docker Image: To deploy MariaDB 10.11, prepare a Docker image. You can use the official MariaDB image and customize it as needed:

    FROM mariadb:10.11
    ENV MYSQL_ROOT_PASSWORD=root_password
    ENV MYSQL_DATABASE=cms_database
    ENV MYSQL_USER=cms_user
    ENV MYSQL_PASSWORD=cms_password
    
  3. Creating and Running the Container: Use Docker commands to create and run the container:
    docker build -t my_mariadb:10.11 .
    docker run -d --name mariadb_container -p 3306:3306 my_mariadb:10.11
    ​
  4. Configuring Network Access: To ensure external database availability, set up proper network access and port forwarding. Docker allows mapping container ports to the host machine.

Integration with Content Management Systems

  1. Configuring CMS Connection: In CMS platforms like Wordpress, Joomla, or Drupal, configure the connection to the external database. This includes entering the host server IP address, port, database name, username, and password.

  2. Performance Optimization: To ensure optimal performance, regularly monitor database and container load, optimize queries, and maintain database indexes.

Database Security

  1. Encryption and Access Rights: Use data encryption and properly set database access rights to protect sensitive information.

  2. Firewall and Network Security: Configure firewall and other security measures to restrict database access to authorized IP addresses only.

  3. Regular Updates and Backups: Keep the database software updated and perform regular backups to ensure data recovery in case of failure.

Conclusion Running an external MariaDB 10.11 database in a container for CMS on shared hosting offers many benefits, including enhanced security, scalability, and simplified management. Proper setup and configuration of containers enable the effective utilization of these benefits, improving the overall performance and stability of content management systems.