If you want that database to be accessed from anywhere you can pass ‘%’.īelow are the default values of the database name, username, and Password Cloudera uses if you don’t change it at the time installation. In place of ‘ %‘, you can enter the hostname or IP of the system from where the user can access this database. Here, in place of database enter the name of the database. Mysql> grant all on database.* TO ' IDENTIFIED BY ' password' Now, you’ll have to create database for each of the services like Activity Monitor, Reports Manager, Hive Metastore Server, Sentry Server, Cloudera Navigator Audit Server, hue and Cloudera Navigator Metadata Server mysql> create database database DEFAULT CHARACTER SET utf8 For example: $ sudo mkdir -p /usr/share/java/ If the target directory does not yet exist on this host, you can create it before copying the JAR file. $ sudo cp mysql-connector-java-5.1.31/mysql-connector-java-5.1.31-bin.jar /usr/share/java/mysql-connector-java.jar Copy the JDBC driver, renamed, to the relevant host.Tar zxvf mysql-connector-java-5.1.31.tar.gz
#log_bin should be on a disk with enough free space. # Disabling symbolic-links is recommended to prevent assorted security risks So we need to know following informations for the mysql database: Driver class: The driver class for the mysql database is.
In this example we are using MySql as the database. Now, edit my.cnf file from /etc/my.cnf with the below settings. To connect Java application with the MySQL database, we need to follow 5 following steps. If you want to login using a different username then in place of ‘root’ mention that username.Īfter you have started the MySQL service, go to /var/lib/mysql and rename old InnoDB log files ib_logfile0 and ib_logfile1 to something else.Ĭd /var/lib/mysql mv ib_logfile1 ib_logfile1_bkp mv ib_logfile0 ib_logfile0_bkp Now, to login to MySQL you’ll have to type the below commandĮnter Password : enter_your_password for root user OK, successfully used password, moving on. Set the root password for MySQL using the below steps: $ sudo /usr/bin/mysql_secure_installationĮnter current password for root (enter for none): To install it on CentOS use the below command, If you have already installed MySQL then you can move forward if you haven’t then please check out the below post which would help you to install MySQL on CentOS. In this post, I will use MySQL as the database to be used. The first step in setting up Cloudera Hadoop Cluster is configuring the Database.