Step-by-Step Guide to Installing MariaDB on CentOS 6.5

2024-07-27




  1. Update system packages:
sudo yum update
  1. Install EPEL repository (optional):
sudo yum install epel-release
  1. Install MariaDB server package:
sudo yum install mariadb-server mariadb-client
  1. Start MariaDB service:
sudo systemctl start mariadb
  1. Secure MariaDB installation (This is interactive and won't show the commands):
sudo mysql_secure_installation

Note: When running mysql_secure_installation, it will prompt you to set a root password, remove anonymous users, disallow root login remotely, and reload privilege tables. Respond accordingly to secure your installation.

  1. Connect to MariaDB (after setting a password):
mysql -u root -p

(Enter your root password when prompted)




  1. Compiling from Source:

This method gives you more control over the installation process, allowing you to customize build options. However, it's also the most complex and time-consuming approach. You'll need to download the MariaDB source code, configure build options, compile the software, and then manually install it. Refer to the MariaDB documentation for detailed instructions:

  1. Using Yum Repositories with Pre-built Binaries:

While the official MariaDB yum repositories might not be available for CentOS 6.5 by default due to its age, there are third-party repositories that offer pre-built MariaDB binaries. Use caution with these repositories as they might not be officially supported by MariaDB and could introduce security risks.

Here's a general outline (Remember to replace <repo_url> with the actual repository URL):

  • Add the repository using yum:

    sudo yum install -y yum-utils
    sudo yum-config-manager --add-repo `<repo_url>`
    
  • Import the GPG key (if provided by the repository)

    sudo rpm --import <GPG_KEY_URL>  # Replace with the actual GPG key URL
    
  • Update package information and install MariaDB:

    sudo yum update
    sudo yum install mariadb-server mariadb-client
    

Important points to consider with third-party repositories:

  • Security: Research the reputation of the repository before adding it.
  • Compatibility: Ensure the provided MariaDB version is compatible with CentOS 6.5.
  • Support: You might not receive official support for issues encountered using these repositories.

mariadb



Understanding "Grant All Privileges on Database" in MySQL/MariaDB

In simple terms, "granting all privileges on a database" in MySQL or MariaDB means giving a user full control over that specific database...


MAMP with MariaDB: Configuration Options

Stands for Macintosh Apache MySQL PHP.It's a local development environment that bundles Apache web server, MySQL database server...


MySQL 5 vs 6 vs MariaDB: Choosing the Right Database Server

The original open-source relational database management system (RDBMS).Widely used and considered the industry standard...


Beyond Backups: Alternative Approaches to MySQL to MariaDB Migration

There are two main approaches depending on your comfort level:Complete Uninstall/Install:Stop the MySQL server. Uninstall MySQL...


MySQL vs MariaDB vs Percona Server vs Drizzle: Choosing the Right Database

Here's an analogy: Imagine MySQL is a popular recipe for a cake.MariaDB would be someone taking that recipe and making a very similar cake...



mariadb

Troubleshooting MySQL Error 1153: Got a packet bigger than 'max_allowed_packet' bytes

MySQL Error 1153: This specific error code indicates that the database server (MySQL or MariaDB) has rejected a data packet sent by the client (mysql or another tool) because the packet size exceeds the server's configured maximum allowed packet size


Speed Up Your Inserts: Multi-Row INSERT vs. Multiple Single INSERTs in MySQL/MariaDB

Reduced Overhead: Sending a single INSERT statement with multiple rows requires less network traffic compared to sending many individual INSERT statements


Understanding MySQL's SELECT * INTO OUTFILE LOCAL Statement

Functionality:This statement exports the results of a MySQL query to a plain text file on the server that's running the MySQL database


MariaDB for Commercial Use: Understanding Licensing and Support Options

Commercial License: Typically refers to a license where you pay a fee to use software for commercial purposes (selling a product that uses the software)


Fixing 'MariaDB Engine Won't Start' Error on Windows

MariaDB: An open-source relational database management system similar to MySQL.Windows: The operating system where MariaDB is installed