Moving a MySQL Database to a new VM or Physical SUSE Linux Enterprise Server


By: noneal

July 9, 2009 1:14 pm





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:

  1. SSH to Exsiting MySQL Server .. and type:
  2. mysqldump -u root -p DatabaseName > DatabaseName.sql
  3. Copy the DatabaseName.sql file to the new server and type:
  4. mysqladmin -u root -p CREATE DatabaseName
  5. mysql -u root -p DatabaseName < DatabaseName.sql

Here is the Copy Process from step 3 above.

  1. Find the dir on the src server which was /apps in this scenario..Now, ssh to the target server
  2. Issue scp -r root@sourceip:/dirname . (notice the space dot at the end)
  3. The server will ask for the root password
  4. 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!

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Tags: ,
Categories: SUSE Linux Enterprise Server, Technical Solutions, Virtualization

Disclaimer: As with everything else in the SUSE Blog, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

1 Comment

  1. By:grimlock

    Make sure the versions are the same major version of the database, and check the character encoding of the database. You could run into issues if the old server was using something like latin1 for the encoding and the new database was using UTF8 if you didn’t convert it first.