Solved

How to move MySql DB to a new server?

Posted on 2009-07-14
8
433 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
  • 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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
Creating and Managing Databases with phpMyAdmin in cPanel.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now