Solved

Linux MySQL

Posted on 2012-03-12
2
412 Views
Last Modified: 2012-03-25
How can I make a copy of all of the databases in a MySQL  server and move them to another server?  I believe they all have different logins so looking for an easy process.
0
Comment
Question by:Jack_son_
2 Comments
 
LVL 21

Assisted Solution

by:theGhost_k8
theGhost_k8 earned 250 total points
ID: 37713416
- if you have root access you can do mysql dump.
- if you have filesystem access you may stop mysql / flush tables with read lock and then copy data files.
- dump each of the db one by one!! may be a shellscript will do the job! You may directly redirect it to target db if it's accesible:
mysqldump -uUSER -pPASS --databases DB1 | mysql -uUSER -pPASS -hREMOTEHOST/IP
0
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 250 total points
ID: 37713866
Hi!

The easiest way is to use mysqldump as theGhost_k8 says.
To dump all the databases you issue
mysqldump -uUSER -pPASS --all-databases > dumpfile.sql
and then issue
mysql -uUSER -pPASS < dumpfile.sql

http://dev.mysql.com/doc/refman/5.5/en/mysqldump.html

Hope this helps.

Regards,
     Tomas Helgi
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

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…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

831 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