Downloading and installing MySQL database

Download and install MySQL database depending on your CDP and Operating System (OS) version.

  1. Download the MySQL distribution from https://dev.mysql.com/downloads/ 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 mysql-server
    On SLES:
    sudo zypper install mysql
    On Ubuntu:
    sudo apt-get install mysql-server    #set root psswd when prompted
    On Debian:
    sudo apt-get install mysql-server    #set root psswd when prompted
  3. Start the database server using the following commands depending on your operating system:
    On RHEL/CentOS:
    sudo service mysqld start
    On SLES:
    sudo rcmysql start
    On Ubuntu:
    sudo service mysql start
    On Debian:
    sudo service mysql start
  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 MySQL 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