Moving a MySQL Database to a new VM or Physical SUSE Linux Enterprise Server
Scenario: We moved from VMware ESX to Citrix XenServer 5.5….We had to get our GroupLink everything HelpDesk to a new VM…..Instead of a V2V process we quickly spun up a new SLES10 Server (15 seconds) and copied the MySQL Database over to the new server:
- SSH to Exsiting MySQL Server .. and type:
- mysqldump -u root -p DatabaseName > DatabaseName.sql
- Copy the DatabaseName.sql file to the new server and type:
- mysqladmin -u root -p CREATE DatabaseName
- mysql -u root -p DatabaseName < DatabaseName.sql
Here is the Copy Process from step 3 above.
- Find the dir on the src server which was /apps in this scenario..Now, ssh to the target server
- Issue scp -r root@sourceip:/dirname . (notice the space dot at the end)
- The server will ask for the root password
- Now Authenticate and the source data will be copied over to the new server in root/apps
Quickly ran the install of eHD against the database and ShaZaaaam. Done!