Connecting to MySQL for Azure Site Recovery (ASR)
When using ASR to replication VMware or physical machines into Azure two roles are required – the configuration and process servers (often combined on a single server) – to help coordinate and facilitate the data replication (https://docs.microsoft.com/en-us/azure/site-recovery/site-recovery-vmware-to-azure#run-site-recovery-unified-setup). On the configuration server, configuration data is stored in a MySQL database. *at this time this is a requirement to use MySQL, other databases types are not supported.
There are several scenarios when you may need to verify or modify data stored in this database. Below are samples for your reference.
Note – database modifications will impact ASR and should be done with care
Login to MySQL and Connect to the ASR Database
from a command prompt:
mysql –u root –p (you will be prompted to enter the password specified during installation)
show databases; (will list all databases for your reference)
use svsdb1; (selects the ASR database so future queries will run against it)
To list all machines registered with the configuration server (CS)
select id as hostid, name, ipaddress, ostype as operatingsystem, from_unixtime(lasthostupdatetime) as heartbeat from hosts where name!='InMageProfiler'\G;
To Cleanup Duplicate/Stale Entries
To Update the IP of a Machine
update hosts set ipaddress='[new address]' where ipaddress='[old address]';
example, update hosts set ipaddress='192.168.0.4' where ipaddress='11.0.0.10';