?
Solved

How to move MySql DB to a new server?

Posted on 2009-07-14
8
Medium Priority
?
440 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
Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

 
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 2000 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

801 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