Solved

How to move MySql DB to a new server?

Posted on 2009-07-14
8
439 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
Raise the IQ of Your IT Alerts

From IT major incidents to manufacturing line slowdowns, every business process generates insights that need to reach the people required to take action. You need a platform that integrates with your business tools to create fully enabled DevOps toolchains.

You need xMatters.

 
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

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!

Question has a verified solution.

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

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

717 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