Solved

How to move MySql DB to a new server?

Posted on 2009-07-14
8
438 Views
Last Modified: 2012-06-27
I have a test server that we developed a website on.  It has MySQL on it.  I would like to move the test stuff onto a prodcution server.  The web stuff is easy to move, however, I have no clue how to move the MySQL DB.  I will nuke the test server once the move is complete so keeping MySQL on the test server is not important. How can I move the MySQL to a new server?  ny help is seriously appreciated!
0
Comment
Question by:Stephen York
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
8 Comments
 
LVL 1

Author Comment

by:Stephen York
ID: 24852412
Sorry, forgot to add that the DB is loaded on a Win2K3, IIS server and going to the same ....
0
 
LVL 6

Expert Comment

by:k_dietz
ID: 24852477
Install MySQL on the new server and get all of the permissions set up correctly for root and whatnot... then simply copy the Data directory over from C:\Program Files\MySQL\MySQL Server 5.0\ on the old server to the new (change the path if you installed it somewhere other than the default).

The data directory contains the schemas and everything and it will copy/paste intact.
0
 
LVL 1

Author Comment

by:Stephen York
ID: 24852668
When you say set the permissions for the root and whatnot, is this the folder level permissions, or user permissions on the DB itself?

I also installed the PHPmyadmin program - will the permissions,... go with the data files as well?

Thanx for helping!
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 6

Expert Comment

by:k_dietz
ID: 24852698
Actually now that I think about it, all of the DB passwords (even the root one) are stored in the mysql schema so copying that directory over will bring all of your permissions over as well.

phpmyadmin will be able to work with the DB just fine - just set it up to connect using root or a sql username you have set up in the test region and it will copy over.
0
 
LVL 1

Author Comment

by:Stephen York
ID: 24852819
So, just to be sure that I have this straight...

I install MySQl, stop mySQL service on both machines, then just copy everything from the old server to the new  (D:\Program Files\MySQL\MySQL Server 5.1) and restart services?
0
 
LVL 6

Accepted Solution

by:
k_dietz earned 500 total points
ID: 24852873
close...  yes to everything, except the only directory you're copying is the data directory, which is found in that path that you listed.  leave the program directories alone.
0
 
LVL 1

Author Comment

by:Stephen York
ID: 24852930
Thanx - I am going to start the process - should be able to award points tomorrow - THANK YOU for your help!!!!!!!!!
0
 
LVL 1

Author Closing Comment

by:Stephen York
ID: 31603402
worked like a charm - thank you!
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question