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
Solved

Linux MySQL

Posted on 2012-03-12
2
413 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

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 …
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

808 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