Downloading and installing MariaDB database

Download and install MariaDB database on a host in your CDP cluster depending on your CDP and OS version.

  1. Download the MariaDB distribution from https://mariadb.org/download/ based on your OS version.
    Use the Cloudera Support Matrix for finding the compatibile versions.
  2. Install the database using the following commands depending on your operating system:
    On RHEL/CentOS:
    sudo yum install mariadb-server
    On SLES:
    sudo zypper install mariadb
    On Ubuntu:
    sudo apt-get install mariadb-server    #set root psswd when prompted
    On Debian:
    sudo apt-get install mariadb-server    #set root psswd when prompted
  3. Start the database server using the following commands depending on your operating system:
    On RHEL/CentOS:
    sudo systemctl start mariadb
    On SLES:
    sudo systemctl start mariadb
    On Ubuntu, MariaDB starts automatically after installation. Run the following command to check the status:
    sudo systemctl status mariadb
    On Debian, MariaDB starts automatically after installation. Run the following command to check the status:
    sudo systemctl status mariadb
  4. Secure your installation by running the following command:
    sudo /usr/bin/mysql_secure_installation
    mysql_secure_installation is a shell script available on Unix systems, and enables you to improve the security of your MariaDB installation in the following ways:
    Enter current password for root (enter for none): [If unset, press Enter.] 
    OK, successfully used password, moving on...
    [...]
    Set root password? [Y/n] Y [Enter n if password is set.]
    New password:
    Re-enter new password:
    Remove anonymous users? [Y/n] Y
    [...]
    Disallow root login remotely? [Y/n] N
    [...]
    Remove test database and access to it [Y/n] Y
    [...]
    Reload privilege tables now? [Y/n] Y