⚙️
Setting Up Cloudera Data Platform(CDP)
  • CDP Overview
  • Why CDP?
  • CDP Services
  • Setting up Google Cloud Platform(GCP) for Cloudera
  • Creating User
  • Configuring Network Settings
  • Configuring Oracle Java
  • Installing Server
  • Configuring MySQL
  • Set Firewall rule on GCP
  • Cloudera Data Platform Installation
  • Working with Cloudera Manager
  • Set Up a Cluster
  • Testing Your Hadoop Installation
  • Installing Hive
  • Hive Validation
  • Deploying Spark 2.4
  • Running Job on Apache Spark2
  • Installing Kafka
  • Kafka Validation
  • Common Warnings and Errors
Powered by GitBook
On this page
  • Install MySQL
  • Start the mysql Daemon
  • Installing mySQL JDBC driver
  • Configure the External Database

Configuring MySQL

PreviousInstalling ServerNextSet Firewall rule on GCP

Last updated 3 years ago

Install MySQL

Download and add the repository, then update.

sudo yum install wget -y
wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
sudo yum update -y

Install MySQL as usual and start the service. During installation, you will be asked if you want to accept the results from the rpm file’s GPG verification. If no error or mismatch occurs, enter y.

sudo yum install mysql-server -y

Start the mysql Daemon

sudo systemctl start mysqld

Ensure that daemon stays active even after reboot

sudo systemctl enable mysqld

Installing mySQL JDBC driver

sudo yum install mysql-connector-java -y

Configure the External Database

  1. Run the Script

Service

Database

User

Cloudera Manager Server

scm

scmuser

Activity Monitor

amon

amonuser

Reports Manager

rman

rmanuser

Hue

hue

hueuser

Hive Metastore Server

metastore

hiveuser

Oozie

oozie

oozieuser

Data Analytics Studio

das

dasuser

Ranger

ranger

rangeradmin

vi mysql-setup.sql

CREATE DATABASE scm DEFAULT CHARACTER SET utf8;
GRANT ALL on scm.* TO 'scmuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE metastore DEFAULT CHARACTER SET utf8;
GRANT ALL on metastore.* TO 'hiveuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE amon DEFAULT CHARACTER SET utf8;
GRANT ALL on amon.* TO 'amonuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE rman DEFAULT CHARACTER SET utf8;
GRANT ALL on rman.* TO 'rmanuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE hue DEFAULT CHARACTER SET utf8;
GRANT ALL on hue.* TO 'hueuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE oozie DEFAULT CHARACTER SET utf8;
GRANT ALL on oozie.* TO 'oozieuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE das DEFAULT CHARACTER SET utf8;
GRANT ALL on das.* TO 'dasuser'@'%' IDENTIFIED BY 'password';
CREATE DATABASE ranger DEFAULT CHARACTER SET utf8;
GRANT ALL on ranger.* TO 'rangeradmin'@'%' IDENTIFIED BY 'password';
mysql -u root < mysql-setup.sql
sudo /usr/bin/mysql_secure_installation

Set Password: password

Note: There is no current password for root in mysql so simply press Enter without entering password

  1. Open mysql Shell

mysql -u root -p

Enter the password: “password”

mysql > show databases;

To exit the Shell

mysql > exit;