Open Fatiaro opened 6 years ago
Install Database (MariaDb)
sudo yum install mariadb-server sudo service mariadb stop sudo systemctl enable mariadb sudo service mariadb start
tar zxvf mysql-connector-java-5.1.46.tar.gz sudo mkdir -p /usr/share/java/ sudo cp mysql-connector-java-5.1.46/mysql-connector-java-5.1.46-bin.jar /usr/share/java/mysql-connector-java.jar sudo mkdir -p /usr/share/java/
create database scm DEFAULT CHARACTER SET utf8; grant all on scm. TO 'scm'@'%' IDENTIFIED BY 'scm'; grant all on scm. TO 'scm'@'localhost' IDENTIFIED BY 'scm'; grant all on scm.* TO 'scm'@'172.31.31.27' IDENTIFIED BY 'scm';
create database rman DEFAULT CHARACTER SET utf8; grant all on rman. TO 'rman'@'%' IDENTIFIED BY 'rman'; grant all on rman. TO 'rman'@'localhost' IDENTIFIED BY 'rman'; grant all on rman.* TO 'rman'@'172.31.31.27' IDENTIFIED BY 'rman';
create database hive DEFAULT CHARACTER SET utf8; grant all on hive. TO 'hive'@'%' IDENTIFIED BY 'hive'; grant all on hive. TO 'hive'@'localhost' IDENTIFIED BY 'hive'; grant all on hive.* TO 'hive'@'172.31.31.27' IDENTIFIED BY 'hive';
create database oozie DEFAULT CHARACTER SET utf8; grant all on oozie. TO 'oozie'@'%' IDENTIFIED BY 'oozie'; grant all on oozie. TO 'oozie'@'localhost' IDENTIFIED BY 'oozie'; grant all on oozie.* TO 'oozie'@'172.31.31.27' IDENTIFIED BY 'oozie';
create database hue DEFAULT CHARACTER SET utf8; grant all on hue. TO 'hue'@'%' IDENTIFIED BY 'hue'; grant all on hue. TO 'hue'@'localhost' IDENTIFIED BY 'hue'; grant all on hue.* TO 'hue'@'172.31.31.27' IDENTIFIED BY 'hue';
create database sentry DEFAULT CHARACTER SET utf8; grant all on sentry. TO 'sentry'@'%' IDENTIFIED BY 'sentry'; grant all on sentry. TO 'sentry'@'localhost' IDENTIFIED BY 'sentry'; grant all on sentry.* TO 'sentry'@'172.31.31.27' IDENTIFIED BY 'sentry';
mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1
Connection id: 4
Current database:
Current user: root@localhost
SSL: Not in use
Current pager: stdout
Using outfile: ''
Using delimiter: ;
Server: MariaDB
Server version: 5.5.56-MariaDB MariaDB Server
Protocol version: 10
Connection: Localhost via UNIX socket
Server characterset: latin1
Db characterset: latin1
Client characterset: utf8
Conn. characterset: utf8
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 17 min 22 sec
[ec2-user@ip-172-31-31-117 ~]$ mysql -u root -p -e "show databases;" Enter password: +--------------------+ | Database | +--------------------+ | information_schema | | hive | | hue | | mysql | | oozie | | performance_schema | | rman | | scm | | sentry | | test | +--------------------+ [ec2-user@ip-172-31-31-117 ~]$
Exit-test: Install Database startet