Reply
Explorer
Posts: 12
Registered: ‎01-13-2017

MySQL instance move from one to another

Hello team,

We have activity montitor, navigator audit, navaigator metadata, reports manager, hive metastore, hue, oozie, sentry as a MySQL instance.

 

Is there any impact if we move the MySQL instance to another node. That is install in anothe node, copy MySQL data directory. And remove MySQL instance from the existing node.

 

Thanks and regards

Sayak

Cloudera Employee
Posts: 26
Registered: ‎07-11-2016

Re: MySQL instance move from one to another

Hello Saayak,

 

The only impact in moving your MySQL instance to another server is that if you do not update your CM/CDH configuration to point to the new MySQL instance.

 

After you stop your cluster, export and import the MySQL databases, you will need to make the following configration changes:


1. For Cloudera Manager:

 

a. Go to /etc/cloudera-scm-server/

 

b. Backup the following file:

 

- db.properties

 

c. In the db.properties file, change the following attribute to point to your new MySQL host:

 

- com.cloudera.cmf.db.host=


2. For Hive Metastore:

 

a. In Cloudera Manager, go to Hive -> Configuration.

 

b. Search for the following property: "Hive Metastore Database Host"

 

c. Change the value for "Hive Metastore Database Host" to your new host's fully qualified domain name.

 

d. Save changes.

 


3. For Oozie:

 

a. In Cloudera Manager, go to Oozie -> Configuration.

 

b. Search for the following property: "Oozie Server Database Host"

 

c. Change the value for "Oozie Server Database Host" to your new host's fully qualified domain name

 

d. Save changes.

 


4. Cloudera Navigator:

 

a. In Cloudera Manager, go to Cloudera Management Service -> Configuration.

 

b. Search for the following property: Navigator Audit Server Database Hostname

 

c. Change the value for "Navigator Audit Server Database Hostname" to your new host's fully qualified domain name.

 

d. Search for the following property: "Navigator Metadata Server Database Hostname"

 

e. Change the value for "Navigator Metadata Server Database Hostname" to your new host's fully qualified domain name.

 

f. Save changes.

 

 

5. For Sentry:

 

a. In Cloudera Manager, go to Sentry -> Configuration.

 

b. Search for the following property: "Sentry Server Database Host"

 

c. Change the value for "Sentry Server Database Host" to your new host's fully qualified domain name

 

d. Save changes.


6. For Hue:

 

a. In Cloudera Manager, go to Hue -> Configuration.

 

b. Search for the following property: "Hue Database Hostname"

 

c. Change the value for "Hue Database Hostname" to your new host's fully qualified domain name

 

d. Save changes.

 

Explorer
Posts: 12
Registered: ‎01-13-2017

Re: MySQL instance move from one to another

Thanks for the detailed description.
Explorer
Posts: 12
Registered: ‎01-13-2017

Re: MySQL instance move from one to another

We started the process by shutting down the cluster and MySQL instance.

 

When the MySQL instance was stopped, the CM UI went blank.

 

How we make the hostname changes ?

 

Is there any configuration needed in my.cnf for MySQL instance in Cloudera ? As when we installed MySQL instance in new node, and then copied the data directory and started the MySQL instance, it failed to start.

 

For the MySQL data directory move, we followed below steps.

 

1.Stop MySQL server in previous instance

2. cp -R /var/lib/mysql/ <new instance path>

3. Installed MySQL in new instance

4. mv /var/lib/mysql/ /var/lib/mysql_56_clean

5. cp -R  <new instance path> </var/lib/mysql/ in new instance> and changed permissions

6 Start MySQL instance in new instance (failed to start)

 

Thanks and regards

Sayak

Announcements