CDH Mysql database upgrade Yuan

 

Metadata database design to service: scm library: server hive library: hive amon library: cloudera management services

Metabase upgraded from 5.7.24 to 5.7.25, in order to avoid upgrade failure leads to a cluster is not available, we plan to install 5.7.25 database in another node, and then import the data and complete database cm switch.

1. Turn off the hive, clouderamanagement service
2. Turn off the main node server, node agent processes all
3. Back up the data inside and mysql my.cnf

cp /etc/my.cnf /etc/my.cnf.bak
mysqldump -uroot -proot --all-databases > mysqlbak.sql

4. Install mysql, initialize, start, set the root password, into the data, view users, create user grant user rights;

Copy the code
LL 

MySQL-Community-Common-5.7.25-1.el7.x86_64.rpm 

MySQL-Community-libs-compat-5.7.25-1.el7.x86_64.rpm 

MySQL-Community-Client-5.7.25-1.el7 .x86_64.rpm 

MySQL-Community Community-libs-5.7.25-1.el7.x86_64.rpm 

MySQL-Community Community-Server-5.7.25-1.el7.x86_64.rpm 
# install 
RPM -ivh * 
# initialize 
mysqld --initialize = MySQL --user 
# start 
systemctl start mysqld 

MySQL-uroot--p 
# Change password 
the ALTER the uSER 'root' @ 'localhost' IDENTIFIED BY 'root'; 

# view the user 
select Host, user from mysql.user; 

create user authorization 
create User 'SCM' @ '%' IDENTIFIED by 'SCM'; 
. * Grant All privileges ON ON SCM 'SCM' @ '%';
Copy the code


5. Modify configuration cloudera-scm-server host
/etc/cloudera-scm-server/db.properties
specified server hostname of the new cluster of db

6. visual page modify amon, hive database information.

Metadata database design to service: scm library: server hive library: hive amon library: cloudera management services

Metabase upgraded from 5.7.24 to 5.7.25, in order to avoid upgrade failure leads to a cluster is not available, we plan to install 5.7.25 database in another node, and then import the data and complete database cm switch.

1. Turn off the hive, clouderamanagement service
2. Turn off the main node server, node agent processes all
3. Back up the data inside and mysql my.cnf

cp /etc/my.cnf /etc/my.cnf.bak
mysqldump -uroot -proot --all-databases > mysqlbak.sql

4. Install mysql, initialize, start, set the root password, into the data, view users, create user grant user rights;

Copy the code
LL 

MySQL-Community-Common-5.7.25-1.el7.x86_64.rpm 

MySQL-Community-libs-compat-5.7.25-1.el7.x86_64.rpm 

MySQL-Community-Client-5.7.25-1.el7 .x86_64.rpm 

MySQL-Community Community-libs-5.7.25-1.el7.x86_64.rpm 

MySQL-Community Community-Server-5.7.25-1.el7.x86_64.rpm 
# install 
RPM -ivh * 
# initialize 
mysqld --initialize = MySQL --user 
# start 
systemctl start mysqld 

MySQL-uroot--p 
# Change password 
the ALTER the uSER 'root' @ 'localhost' IDENTIFIED BY 'root'; 

# view the user 
select Host, user from mysql.user; 

create user authorization 
create User 'SCM' @ '%' IDENTIFIED by 'SCM'; 
. * Grant All privileges ON ON SCM 'SCM' @ '%';
Copy the code


5. Modify configuration cloudera-scm-server host
/etc/cloudera-scm-server/db.properties
specified server hostname of the new cluster of db

6. visual page modify amon, hive database information.

Guess you like

Origin www.cnblogs.com/zhangrui153169/p/11527487.html