Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to move MySql DB to a new server?

Posted on 2009-07-14
8
Medium Priority
?
441 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
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
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

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
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 Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

610 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