Created
April 10, 2015 19:09
-
-
Save nalingarg2/3a295cad33125ab8ce70 to your computer and use it in GitHub Desktop.
cloudera manager sql database for amon etc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To create the MySQL databases for Cloudera Manager: | |
Log into MySQL as the root user: | |
$ mysql -u root -p | |
Enter password: | |
Create a database for the Activity Monitor. The database name, user name, and password can be anything you want. For example: | |
mysql> create database amon DEFAULT CHARACTER SET utf8; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> grant all on amon.* TO 'amon'@'%' IDENTIFIED BY 'amon_password'; | |
Query OK, 0 rows affected (0.00 sec) | |
Create a database for the Service Monitor. The database name, user name, and password can be anything you want. For example: | |
mysql> create database smon DEFAULT CHARACTER SET utf8; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> grant all on smon.* TO 'smon'@'%' IDENTIFIED BY 'smon_password'; | |
Query OK, 0 rows affected (0.00 sec) | |
Create a database for the Report Manager. The database name, user name, and password can be anything you want. For example: | |
mysql> create database rman DEFAULT CHARACTER SET utf8; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> grant all on rman.* TO 'rman'@'%' IDENTIFIED BY 'rman_password'; | |
Query OK, 0 rows affected (0.00 sec) | |
Create a database for the Host Monitor. The database name, user name, and password can be anything you want. For example: | |
mysql> create database hmon DEFAULT CHARACTER SET utf8; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> grant all on hmon.* TO 'hmon'@'%' IDENTIFIED BY 'hmon_password'; | |
Query OK, 0 rows affected (0.00 sec) | |
Create a database for the Hive metastore. The database name, user name, and password can be anything you want. For example: | |
mysql> create database hive DEFAULT CHARACTER SET utf8; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> grant all on hive.* TO 'hive'@'%' IDENTIFIED BY 'hive_password'; | |
Query OK, 0 rows affected (0.00 sec) | |
Create a database for Cloudera Navigator. The database name, user name, and password can be anything you want. For example: | |
mysql> create database nav DEFAULT CHARACTER SET utf8; | |
Query OK, 1 row affected (0.00 sec) | |
mysql> grant all on nav.* TO 'nav'@'%' IDENTIFIED BY 'nav_password'; | |
Query OK, 0 rows affected (0.00 sec) | |
Backing Up the MySQL Databases | |
To back up the MySQL database, run the mysqldump command on the MySQL host, as follows: | |
$ mysqldump -h<hostname> -u<username> -p<password> <database> > /tmp/<database-backup>.sql | |
For example, to back up database scm_database on the local host as the root user, with the password mypasswd: | |
$ mysqldump -pmypasswd scm_database > /tmp/scm_database-backup.sql | |
To back up database scm_database on remote host myhost.example.com as the root user, with the password mypasswd: | |
$ mysqldump -hmyhost.example.com -uroot -pcloudera scm_database > /tmp/scm_database-backup.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment