Nithinraot / SEBC

0 stars 0 forks source link

install database #8

Open Nithinraot opened 6 years ago

Nithinraot commented 6 years ago

Install DB -> installing maria db: sudo yum install mariadb-server sudo service mariadb stop update /etc/my.cnf -> socket=/var/lib/mysql/mysql.sock

Disabling symbolic-links is recommended to prevent assorted security risks

symbolic-links=0

Settings user and group are ignored when systemd is used. If you need to run mysqld under a different user or group, customize your systemd unit file for mariadb according to the instructions in http://fedoraproject.org/wiki/Systemd key_buffer = 16M key_buffer_size = 32M max_allowed_packet = 32M thread_stack = 256K thread_cache_size = 64 query_cache_limit = 8M query_cache_size = 64M query_cache_type = 1

binlog_format = mixed

read_buffer_size = 2M read_rnd_buffer_size = 16M sort_buffer_size = 8M join_buffer_size = 8M

log_bin=/var/lib/mysql/mysql_binary_log max_connections = 550 innodb_file_per_table = 1 innodb_flush_log_at_trx_commit = 2 innodb_log_buffer_size = 64M innodb_buffer_pool_size = 4G innodb_thread_concurrency = 8 innodb_flush_method = O_DIRECT innodb_log_file_size = 512M

[mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid

include all files from the config directory !includedir /etc/my.cnf.d

sudo systemctl enable mariadb sudo service mariadb start sudo /usr/bin/mysql_secure_installation -> here set the username password for root/ create a DB named SCM & user named SCM where cloudera-manager-server will use this db.

get the mysql-connector -> wget "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz"

tar -xvf mysql-connector-java-5.1.46.tar.gz

copy this connector to /user/share/java ( create this folder if it doesn not exists) cp mysql-connector-java-5.1.46 /user/share/java/mysql-connector-java

Nithinraot commented 6 years ago

create database oozie default character set utf8; grant all privileges on oozie.* to 'oozie'@'%' identified by 'oozie';

create database scm default character set utf8; grant all privileges on scm.* to 'scm'@'%' identified by 'Cloudera';

create database metastore default character set utf8; grant all privileges on metastore.* to 'hive'@'%' identified by 'hive';

create database rman default character set utf8; grant all privileges on rman.* to 'rman'@'%' identified by 'rman';

create database hue default character set utf8; grant all privileges on hue.* to 'hue'@'%' identified by 'hue';

create database sentry default character set utf8; grant all privileges on sentry.* to 'sentry'@'%' identified by 'sentry';

flush privileges;